0001: /**
0002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
0003: *
0004: * Permission is hereby granted, free of charge, to any person obtaining a copy
0005: * of this software and associated documentation files (the "Software"), to deal
0006: * in the Software without restriction, including without limitation the rights
0007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
0008: * copies of the Software, and to permit persons to whom the Software is
0009: * furnished to do so, subject to the following conditions:
0010: *
0011: * The above copyright notice and this permission notice shall be included in
0012: * all copies or substantial portions of the Software.
0013: *
0014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
0019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
0020: * SOFTWARE.
0021: */package com.liferay.portlet.journal.service.http;
0022:
0023: import com.liferay.portal.kernel.log.Log;
0024: import com.liferay.portal.kernel.log.LogFactoryUtil;
0025: import com.liferay.portal.kernel.util.BooleanWrapper;
0026: import com.liferay.portal.kernel.util.DoubleWrapper;
0027: import com.liferay.portal.kernel.util.IntegerWrapper;
0028: import com.liferay.portal.kernel.util.LongWrapper;
0029: import com.liferay.portal.kernel.util.MethodWrapper;
0030: import com.liferay.portal.kernel.util.NullWrapper;
0031: import com.liferay.portal.security.auth.HttpPrincipal;
0032: import com.liferay.portal.service.http.TunnelUtil;
0033:
0034: import com.liferay.portlet.journal.service.JournalArticleServiceUtil;
0035:
0036: /**
0037: * <a href="JournalArticleServiceHttp.java.html"><b><i>View Source</i></b></a>
0038: *
0039: * <p>
0040: * ServiceBuilder generated this class. Modifications in this class will be
0041: * overwritten the next time is generated.
0042: * </p>
0043: *
0044: * <p>
0045: * This class provides a HTTP utility for the
0046: * <code>com.liferay.portlet.journal.service.JournalArticleServiceUtil</code> service
0047: * utility. The static methods of this class calls the same methods of the
0048: * service utility. However, the signatures are different because it requires an
0049: * additional <code>com.liferay.portal.security.auth.HttpPrincipal</code>
0050: * parameter.
0051: * </p>
0052: *
0053: * <p>
0054: * The benefits of using the HTTP utility is that it is fast and allows for
0055: * tunneling without the cost of serializing to text. The drawback is that it
0056: * only works with Java.
0057: * </p>
0058: *
0059: * <p>
0060: * Set the property <code>tunnel.servlet.hosts.allowed</code> in
0061: * portal.properties to configure security.
0062: * </p>
0063: *
0064: * <p>
0065: * The HTTP utility is only generated for remote services.
0066: * </p>
0067: *
0068: * @author Brian Wing Shun Chan
0069: *
0070: * @see com.liferay.portal.security.auth.HttpPrincipal
0071: * @see com.liferay.portlet.journal.service.JournalArticleServiceUtil
0072: * @see com.liferay.portlet.journal.service.http.JournalArticleServiceSoap
0073: *
0074: */
0075: public class JournalArticleServiceHttp {
0076: public static com.liferay.portlet.journal.model.JournalArticle addArticle(
0077: HttpPrincipal httpPrincipal, java.lang.String articleId,
0078: boolean autoArticleId, long plid, java.lang.String title,
0079: java.lang.String description, java.lang.String content,
0080: java.lang.String type, java.lang.String structureId,
0081: java.lang.String templateId, int displayDateMonth,
0082: int displayDateDay, int displayDateYear,
0083: int displayDateHour, int displayDateMinute,
0084: int expirationDateMonth, int expirationDateDay,
0085: int expirationDateYear, int expirationDateHour,
0086: int expirationDateMinute, boolean neverExpire,
0087: int reviewDateMonth, int reviewDateDay, int reviewDateYear,
0088: int reviewDateHour, int reviewDateMinute,
0089: boolean neverReview, boolean indexable, boolean smallImage,
0090: java.lang.String smallImageURL, java.io.File smallFile,
0091: java.util.Map images, java.lang.String articleURL,
0092: javax.portlet.PortletPreferences prefs,
0093: java.lang.String[] tagsEntries,
0094: boolean addCommunityPermissions, boolean addGuestPermissions)
0095: throws com.liferay.portal.SystemException,
0096: com.liferay.portal.PortalException {
0097: try {
0098: Object paramObj0 = articleId;
0099:
0100: if (articleId == null) {
0101: paramObj0 = new NullWrapper("java.lang.String");
0102: }
0103:
0104: Object paramObj1 = new BooleanWrapper(autoArticleId);
0105:
0106: Object paramObj2 = new LongWrapper(plid);
0107:
0108: Object paramObj3 = title;
0109:
0110: if (title == null) {
0111: paramObj3 = new NullWrapper("java.lang.String");
0112: }
0113:
0114: Object paramObj4 = description;
0115:
0116: if (description == null) {
0117: paramObj4 = new NullWrapper("java.lang.String");
0118: }
0119:
0120: Object paramObj5 = content;
0121:
0122: if (content == null) {
0123: paramObj5 = new NullWrapper("java.lang.String");
0124: }
0125:
0126: Object paramObj6 = type;
0127:
0128: if (type == null) {
0129: paramObj6 = new NullWrapper("java.lang.String");
0130: }
0131:
0132: Object paramObj7 = structureId;
0133:
0134: if (structureId == null) {
0135: paramObj7 = new NullWrapper("java.lang.String");
0136: }
0137:
0138: Object paramObj8 = templateId;
0139:
0140: if (templateId == null) {
0141: paramObj8 = new NullWrapper("java.lang.String");
0142: }
0143:
0144: Object paramObj9 = new IntegerWrapper(displayDateMonth);
0145:
0146: Object paramObj10 = new IntegerWrapper(displayDateDay);
0147:
0148: Object paramObj11 = new IntegerWrapper(displayDateYear);
0149:
0150: Object paramObj12 = new IntegerWrapper(displayDateHour);
0151:
0152: Object paramObj13 = new IntegerWrapper(displayDateMinute);
0153:
0154: Object paramObj14 = new IntegerWrapper(expirationDateMonth);
0155:
0156: Object paramObj15 = new IntegerWrapper(expirationDateDay);
0157:
0158: Object paramObj16 = new IntegerWrapper(expirationDateYear);
0159:
0160: Object paramObj17 = new IntegerWrapper(expirationDateHour);
0161:
0162: Object paramObj18 = new IntegerWrapper(expirationDateMinute);
0163:
0164: Object paramObj19 = new BooleanWrapper(neverExpire);
0165:
0166: Object paramObj20 = new IntegerWrapper(reviewDateMonth);
0167:
0168: Object paramObj21 = new IntegerWrapper(reviewDateDay);
0169:
0170: Object paramObj22 = new IntegerWrapper(reviewDateYear);
0171:
0172: Object paramObj23 = new IntegerWrapper(reviewDateHour);
0173:
0174: Object paramObj24 = new IntegerWrapper(reviewDateMinute);
0175:
0176: Object paramObj25 = new BooleanWrapper(neverReview);
0177:
0178: Object paramObj26 = new BooleanWrapper(indexable);
0179:
0180: Object paramObj27 = new BooleanWrapper(smallImage);
0181:
0182: Object paramObj28 = smallImageURL;
0183:
0184: if (smallImageURL == null) {
0185: paramObj28 = new NullWrapper("java.lang.String");
0186: }
0187:
0188: Object paramObj29 = smallFile;
0189:
0190: if (smallFile == null) {
0191: paramObj29 = new NullWrapper("java.io.File");
0192: }
0193:
0194: Object paramObj30 = images;
0195:
0196: if (images == null) {
0197: paramObj30 = new NullWrapper("java.util.Map");
0198: }
0199:
0200: Object paramObj31 = articleURL;
0201:
0202: if (articleURL == null) {
0203: paramObj31 = new NullWrapper("java.lang.String");
0204: }
0205:
0206: Object paramObj32 = prefs;
0207:
0208: if (prefs == null) {
0209: paramObj32 = new NullWrapper(
0210: "javax.portlet.PortletPreferences");
0211: }
0212:
0213: Object paramObj33 = tagsEntries;
0214:
0215: if (tagsEntries == null) {
0216: paramObj33 = new NullWrapper("[Ljava.lang.String;");
0217: }
0218:
0219: Object paramObj34 = new BooleanWrapper(
0220: addCommunityPermissions);
0221:
0222: Object paramObj35 = new BooleanWrapper(addGuestPermissions);
0223:
0224: MethodWrapper methodWrapper = new MethodWrapper(
0225: JournalArticleServiceUtil.class.getName(),
0226: "addArticle", new Object[] { paramObj0, paramObj1,
0227: paramObj2, paramObj3, paramObj4, paramObj5,
0228: paramObj6, paramObj7, paramObj8, paramObj9,
0229: paramObj10, paramObj11, paramObj12,
0230: paramObj13, paramObj14, paramObj15,
0231: paramObj16, paramObj17, paramObj18,
0232: paramObj19, paramObj20, paramObj21,
0233: paramObj22, paramObj23, paramObj24,
0234: paramObj25, paramObj26, paramObj27,
0235: paramObj28, paramObj29, paramObj30,
0236: paramObj31, paramObj32, paramObj33,
0237: paramObj34, paramObj35 });
0238:
0239: Object returnObj = null;
0240:
0241: try {
0242: returnObj = TunnelUtil.invoke(httpPrincipal,
0243: methodWrapper);
0244: } catch (Exception e) {
0245: if (e instanceof com.liferay.portal.SystemException) {
0246: throw (com.liferay.portal.SystemException) e;
0247: }
0248:
0249: if (e instanceof com.liferay.portal.PortalException) {
0250: throw (com.liferay.portal.PortalException) e;
0251: }
0252:
0253: throw new com.liferay.portal.SystemException(e);
0254: }
0255:
0256: return (com.liferay.portlet.journal.model.JournalArticle) returnObj;
0257: } catch (com.liferay.portal.SystemException se) {
0258: _log.error(se, se);
0259:
0260: throw se;
0261: }
0262: }
0263:
0264: public static com.liferay.portlet.journal.model.JournalArticle addArticle(
0265: HttpPrincipal httpPrincipal, java.lang.String articleId,
0266: boolean autoArticleId, long plid, java.lang.String title,
0267: java.lang.String description, java.lang.String content,
0268: java.lang.String type, java.lang.String structureId,
0269: java.lang.String templateId, int displayDateMonth,
0270: int displayDateDay, int displayDateYear,
0271: int displayDateHour, int displayDateMinute,
0272: int expirationDateMonth, int expirationDateDay,
0273: int expirationDateYear, int expirationDateHour,
0274: int expirationDateMinute, boolean neverExpire,
0275: int reviewDateMonth, int reviewDateDay, int reviewDateYear,
0276: int reviewDateHour, int reviewDateMinute,
0277: boolean neverReview, boolean indexable, boolean smallImage,
0278: java.lang.String smallImageURL, java.io.File smallFile,
0279: java.util.Map images, java.lang.String articleURL,
0280: javax.portlet.PortletPreferences prefs,
0281: java.lang.String[] tagsEntries,
0282: java.lang.String[] communityPermissions,
0283: java.lang.String[] guestPermissions)
0284: throws com.liferay.portal.SystemException,
0285: com.liferay.portal.PortalException {
0286: try {
0287: Object paramObj0 = articleId;
0288:
0289: if (articleId == null) {
0290: paramObj0 = new NullWrapper("java.lang.String");
0291: }
0292:
0293: Object paramObj1 = new BooleanWrapper(autoArticleId);
0294:
0295: Object paramObj2 = new LongWrapper(plid);
0296:
0297: Object paramObj3 = title;
0298:
0299: if (title == null) {
0300: paramObj3 = new NullWrapper("java.lang.String");
0301: }
0302:
0303: Object paramObj4 = description;
0304:
0305: if (description == null) {
0306: paramObj4 = new NullWrapper("java.lang.String");
0307: }
0308:
0309: Object paramObj5 = content;
0310:
0311: if (content == null) {
0312: paramObj5 = new NullWrapper("java.lang.String");
0313: }
0314:
0315: Object paramObj6 = type;
0316:
0317: if (type == null) {
0318: paramObj6 = new NullWrapper("java.lang.String");
0319: }
0320:
0321: Object paramObj7 = structureId;
0322:
0323: if (structureId == null) {
0324: paramObj7 = new NullWrapper("java.lang.String");
0325: }
0326:
0327: Object paramObj8 = templateId;
0328:
0329: if (templateId == null) {
0330: paramObj8 = new NullWrapper("java.lang.String");
0331: }
0332:
0333: Object paramObj9 = new IntegerWrapper(displayDateMonth);
0334:
0335: Object paramObj10 = new IntegerWrapper(displayDateDay);
0336:
0337: Object paramObj11 = new IntegerWrapper(displayDateYear);
0338:
0339: Object paramObj12 = new IntegerWrapper(displayDateHour);
0340:
0341: Object paramObj13 = new IntegerWrapper(displayDateMinute);
0342:
0343: Object paramObj14 = new IntegerWrapper(expirationDateMonth);
0344:
0345: Object paramObj15 = new IntegerWrapper(expirationDateDay);
0346:
0347: Object paramObj16 = new IntegerWrapper(expirationDateYear);
0348:
0349: Object paramObj17 = new IntegerWrapper(expirationDateHour);
0350:
0351: Object paramObj18 = new IntegerWrapper(expirationDateMinute);
0352:
0353: Object paramObj19 = new BooleanWrapper(neverExpire);
0354:
0355: Object paramObj20 = new IntegerWrapper(reviewDateMonth);
0356:
0357: Object paramObj21 = new IntegerWrapper(reviewDateDay);
0358:
0359: Object paramObj22 = new IntegerWrapper(reviewDateYear);
0360:
0361: Object paramObj23 = new IntegerWrapper(reviewDateHour);
0362:
0363: Object paramObj24 = new IntegerWrapper(reviewDateMinute);
0364:
0365: Object paramObj25 = new BooleanWrapper(neverReview);
0366:
0367: Object paramObj26 = new BooleanWrapper(indexable);
0368:
0369: Object paramObj27 = new BooleanWrapper(smallImage);
0370:
0371: Object paramObj28 = smallImageURL;
0372:
0373: if (smallImageURL == null) {
0374: paramObj28 = new NullWrapper("java.lang.String");
0375: }
0376:
0377: Object paramObj29 = smallFile;
0378:
0379: if (smallFile == null) {
0380: paramObj29 = new NullWrapper("java.io.File");
0381: }
0382:
0383: Object paramObj30 = images;
0384:
0385: if (images == null) {
0386: paramObj30 = new NullWrapper("java.util.Map");
0387: }
0388:
0389: Object paramObj31 = articleURL;
0390:
0391: if (articleURL == null) {
0392: paramObj31 = new NullWrapper("java.lang.String");
0393: }
0394:
0395: Object paramObj32 = prefs;
0396:
0397: if (prefs == null) {
0398: paramObj32 = new NullWrapper(
0399: "javax.portlet.PortletPreferences");
0400: }
0401:
0402: Object paramObj33 = tagsEntries;
0403:
0404: if (tagsEntries == null) {
0405: paramObj33 = new NullWrapper("[Ljava.lang.String;");
0406: }
0407:
0408: Object paramObj34 = communityPermissions;
0409:
0410: if (communityPermissions == null) {
0411: paramObj34 = new NullWrapper("[Ljava.lang.String;");
0412: }
0413:
0414: Object paramObj35 = guestPermissions;
0415:
0416: if (guestPermissions == null) {
0417: paramObj35 = new NullWrapper("[Ljava.lang.String;");
0418: }
0419:
0420: MethodWrapper methodWrapper = new MethodWrapper(
0421: JournalArticleServiceUtil.class.getName(),
0422: "addArticle", new Object[] { paramObj0, paramObj1,
0423: paramObj2, paramObj3, paramObj4, paramObj5,
0424: paramObj6, paramObj7, paramObj8, paramObj9,
0425: paramObj10, paramObj11, paramObj12,
0426: paramObj13, paramObj14, paramObj15,
0427: paramObj16, paramObj17, paramObj18,
0428: paramObj19, paramObj20, paramObj21,
0429: paramObj22, paramObj23, paramObj24,
0430: paramObj25, paramObj26, paramObj27,
0431: paramObj28, paramObj29, paramObj30,
0432: paramObj31, paramObj32, paramObj33,
0433: paramObj34, paramObj35 });
0434:
0435: Object returnObj = null;
0436:
0437: try {
0438: returnObj = TunnelUtil.invoke(httpPrincipal,
0439: methodWrapper);
0440: } catch (Exception e) {
0441: if (e instanceof com.liferay.portal.SystemException) {
0442: throw (com.liferay.portal.SystemException) e;
0443: }
0444:
0445: if (e instanceof com.liferay.portal.PortalException) {
0446: throw (com.liferay.portal.PortalException) e;
0447: }
0448:
0449: throw new com.liferay.portal.SystemException(e);
0450: }
0451:
0452: return (com.liferay.portlet.journal.model.JournalArticle) returnObj;
0453: } catch (com.liferay.portal.SystemException se) {
0454: _log.error(se, se);
0455:
0456: throw se;
0457: }
0458: }
0459:
0460: public static com.liferay.portlet.journal.model.JournalArticle approveArticle(
0461: HttpPrincipal httpPrincipal, long groupId,
0462: java.lang.String articleId, double version, long plid,
0463: java.lang.String articleURL,
0464: javax.portlet.PortletPreferences prefs)
0465: throws com.liferay.portal.SystemException,
0466: com.liferay.portal.PortalException {
0467: try {
0468: Object paramObj0 = new LongWrapper(groupId);
0469:
0470: Object paramObj1 = articleId;
0471:
0472: if (articleId == null) {
0473: paramObj1 = new NullWrapper("java.lang.String");
0474: }
0475:
0476: Object paramObj2 = new DoubleWrapper(version);
0477:
0478: Object paramObj3 = new LongWrapper(plid);
0479:
0480: Object paramObj4 = articleURL;
0481:
0482: if (articleURL == null) {
0483: paramObj4 = new NullWrapper("java.lang.String");
0484: }
0485:
0486: Object paramObj5 = prefs;
0487:
0488: if (prefs == null) {
0489: paramObj5 = new NullWrapper(
0490: "javax.portlet.PortletPreferences");
0491: }
0492:
0493: MethodWrapper methodWrapper = new MethodWrapper(
0494: JournalArticleServiceUtil.class.getName(),
0495: "approveArticle", new Object[] { paramObj0,
0496: paramObj1, paramObj2, paramObj3, paramObj4,
0497: paramObj5 });
0498:
0499: Object returnObj = null;
0500:
0501: try {
0502: returnObj = TunnelUtil.invoke(httpPrincipal,
0503: methodWrapper);
0504: } catch (Exception e) {
0505: if (e instanceof com.liferay.portal.SystemException) {
0506: throw (com.liferay.portal.SystemException) e;
0507: }
0508:
0509: if (e instanceof com.liferay.portal.PortalException) {
0510: throw (com.liferay.portal.PortalException) e;
0511: }
0512:
0513: throw new com.liferay.portal.SystemException(e);
0514: }
0515:
0516: return (com.liferay.portlet.journal.model.JournalArticle) returnObj;
0517: } catch (com.liferay.portal.SystemException se) {
0518: _log.error(se, se);
0519:
0520: throw se;
0521: }
0522: }
0523:
0524: public static com.liferay.portlet.journal.model.JournalArticle getArticle(
0525: HttpPrincipal httpPrincipal, long groupId,
0526: java.lang.String articleId, double version)
0527: throws com.liferay.portal.SystemException,
0528: com.liferay.portal.PortalException {
0529: try {
0530: Object paramObj0 = new LongWrapper(groupId);
0531:
0532: Object paramObj1 = articleId;
0533:
0534: if (articleId == null) {
0535: paramObj1 = new NullWrapper("java.lang.String");
0536: }
0537:
0538: Object paramObj2 = new DoubleWrapper(version);
0539:
0540: MethodWrapper methodWrapper = new MethodWrapper(
0541: JournalArticleServiceUtil.class.getName(),
0542: "getArticle", new Object[] { paramObj0, paramObj1,
0543: paramObj2 });
0544:
0545: Object returnObj = null;
0546:
0547: try {
0548: returnObj = TunnelUtil.invoke(httpPrincipal,
0549: methodWrapper);
0550: } catch (Exception e) {
0551: if (e instanceof com.liferay.portal.SystemException) {
0552: throw (com.liferay.portal.SystemException) e;
0553: }
0554:
0555: if (e instanceof com.liferay.portal.PortalException) {
0556: throw (com.liferay.portal.PortalException) e;
0557: }
0558:
0559: throw new com.liferay.portal.SystemException(e);
0560: }
0561:
0562: return (com.liferay.portlet.journal.model.JournalArticle) returnObj;
0563: } catch (com.liferay.portal.SystemException se) {
0564: _log.error(se, se);
0565:
0566: throw se;
0567: }
0568: }
0569:
0570: public static java.lang.String getArticleContent(
0571: HttpPrincipal httpPrincipal, long groupId,
0572: java.lang.String articleId, java.lang.String languageId,
0573: com.liferay.portal.theme.ThemeDisplay themeDisplay)
0574: throws com.liferay.portal.SystemException,
0575: com.liferay.portal.PortalException {
0576: try {
0577: Object paramObj0 = new LongWrapper(groupId);
0578:
0579: Object paramObj1 = articleId;
0580:
0581: if (articleId == null) {
0582: paramObj1 = new NullWrapper("java.lang.String");
0583: }
0584:
0585: Object paramObj2 = languageId;
0586:
0587: if (languageId == null) {
0588: paramObj2 = new NullWrapper("java.lang.String");
0589: }
0590:
0591: Object paramObj3 = themeDisplay;
0592:
0593: if (themeDisplay == null) {
0594: paramObj3 = new NullWrapper(
0595: "com.liferay.portal.theme.ThemeDisplay");
0596: }
0597:
0598: MethodWrapper methodWrapper = new MethodWrapper(
0599: JournalArticleServiceUtil.class.getName(),
0600: "getArticleContent", new Object[] { paramObj0,
0601: paramObj1, paramObj2, paramObj3 });
0602:
0603: Object returnObj = null;
0604:
0605: try {
0606: returnObj = TunnelUtil.invoke(httpPrincipal,
0607: methodWrapper);
0608: } catch (Exception e) {
0609: if (e instanceof com.liferay.portal.SystemException) {
0610: throw (com.liferay.portal.SystemException) e;
0611: }
0612:
0613: if (e instanceof com.liferay.portal.PortalException) {
0614: throw (com.liferay.portal.PortalException) e;
0615: }
0616:
0617: throw new com.liferay.portal.SystemException(e);
0618: }
0619:
0620: return (java.lang.String) returnObj;
0621: } catch (com.liferay.portal.SystemException se) {
0622: _log.error(se, se);
0623:
0624: throw se;
0625: }
0626: }
0627:
0628: public static java.lang.String getArticleContent(
0629: HttpPrincipal httpPrincipal, long groupId,
0630: java.lang.String articleId, double version,
0631: java.lang.String languageId,
0632: com.liferay.portal.theme.ThemeDisplay themeDisplay)
0633: throws com.liferay.portal.SystemException,
0634: com.liferay.portal.PortalException {
0635: try {
0636: Object paramObj0 = new LongWrapper(groupId);
0637:
0638: Object paramObj1 = articleId;
0639:
0640: if (articleId == null) {
0641: paramObj1 = new NullWrapper("java.lang.String");
0642: }
0643:
0644: Object paramObj2 = new DoubleWrapper(version);
0645:
0646: Object paramObj3 = languageId;
0647:
0648: if (languageId == null) {
0649: paramObj3 = new NullWrapper("java.lang.String");
0650: }
0651:
0652: Object paramObj4 = themeDisplay;
0653:
0654: if (themeDisplay == null) {
0655: paramObj4 = new NullWrapper(
0656: "com.liferay.portal.theme.ThemeDisplay");
0657: }
0658:
0659: MethodWrapper methodWrapper = new MethodWrapper(
0660: JournalArticleServiceUtil.class.getName(),
0661: "getArticleContent",
0662: new Object[] { paramObj0, paramObj1, paramObj2,
0663: paramObj3, paramObj4 });
0664:
0665: Object returnObj = null;
0666:
0667: try {
0668: returnObj = TunnelUtil.invoke(httpPrincipal,
0669: methodWrapper);
0670: } catch (Exception e) {
0671: if (e instanceof com.liferay.portal.SystemException) {
0672: throw (com.liferay.portal.SystemException) e;
0673: }
0674:
0675: if (e instanceof com.liferay.portal.PortalException) {
0676: throw (com.liferay.portal.PortalException) e;
0677: }
0678:
0679: throw new com.liferay.portal.SystemException(e);
0680: }
0681:
0682: return (java.lang.String) returnObj;
0683: } catch (com.liferay.portal.SystemException se) {
0684: _log.error(se, se);
0685:
0686: throw se;
0687: }
0688: }
0689:
0690: public static void deleteArticle(HttpPrincipal httpPrincipal,
0691: long groupId, java.lang.String articleId, double version,
0692: java.lang.String articleURL,
0693: javax.portlet.PortletPreferences prefs)
0694: throws com.liferay.portal.SystemException,
0695: com.liferay.portal.PortalException {
0696: try {
0697: Object paramObj0 = new LongWrapper(groupId);
0698:
0699: Object paramObj1 = articleId;
0700:
0701: if (articleId == null) {
0702: paramObj1 = new NullWrapper("java.lang.String");
0703: }
0704:
0705: Object paramObj2 = new DoubleWrapper(version);
0706:
0707: Object paramObj3 = articleURL;
0708:
0709: if (articleURL == null) {
0710: paramObj3 = new NullWrapper("java.lang.String");
0711: }
0712:
0713: Object paramObj4 = prefs;
0714:
0715: if (prefs == null) {
0716: paramObj4 = new NullWrapper(
0717: "javax.portlet.PortletPreferences");
0718: }
0719:
0720: MethodWrapper methodWrapper = new MethodWrapper(
0721: JournalArticleServiceUtil.class.getName(),
0722: "deleteArticle",
0723: new Object[] { paramObj0, paramObj1, paramObj2,
0724: paramObj3, paramObj4 });
0725:
0726: try {
0727: TunnelUtil.invoke(httpPrincipal, methodWrapper);
0728: } catch (Exception e) {
0729: if (e instanceof com.liferay.portal.SystemException) {
0730: throw (com.liferay.portal.SystemException) e;
0731: }
0732:
0733: if (e instanceof com.liferay.portal.PortalException) {
0734: throw (com.liferay.portal.PortalException) e;
0735: }
0736:
0737: throw new com.liferay.portal.SystemException(e);
0738: }
0739: } catch (com.liferay.portal.SystemException se) {
0740: _log.error(se, se);
0741:
0742: throw se;
0743: }
0744: }
0745:
0746: public static void expireArticle(HttpPrincipal httpPrincipal,
0747: long groupId, java.lang.String articleId, double version,
0748: java.lang.String articleURL,
0749: javax.portlet.PortletPreferences prefs)
0750: throws com.liferay.portal.SystemException,
0751: com.liferay.portal.PortalException {
0752: try {
0753: Object paramObj0 = new LongWrapper(groupId);
0754:
0755: Object paramObj1 = articleId;
0756:
0757: if (articleId == null) {
0758: paramObj1 = new NullWrapper("java.lang.String");
0759: }
0760:
0761: Object paramObj2 = new DoubleWrapper(version);
0762:
0763: Object paramObj3 = articleURL;
0764:
0765: if (articleURL == null) {
0766: paramObj3 = new NullWrapper("java.lang.String");
0767: }
0768:
0769: Object paramObj4 = prefs;
0770:
0771: if (prefs == null) {
0772: paramObj4 = new NullWrapper(
0773: "javax.portlet.PortletPreferences");
0774: }
0775:
0776: MethodWrapper methodWrapper = new MethodWrapper(
0777: JournalArticleServiceUtil.class.getName(),
0778: "expireArticle",
0779: new Object[] { paramObj0, paramObj1, paramObj2,
0780: paramObj3, paramObj4 });
0781:
0782: try {
0783: TunnelUtil.invoke(httpPrincipal, methodWrapper);
0784: } catch (Exception e) {
0785: if (e instanceof com.liferay.portal.SystemException) {
0786: throw (com.liferay.portal.SystemException) e;
0787: }
0788:
0789: if (e instanceof com.liferay.portal.PortalException) {
0790: throw (com.liferay.portal.PortalException) e;
0791: }
0792:
0793: throw new com.liferay.portal.SystemException(e);
0794: }
0795: } catch (com.liferay.portal.SystemException se) {
0796: _log.error(se, se);
0797:
0798: throw se;
0799: }
0800: }
0801:
0802: public static void removeArticleLocale(HttpPrincipal httpPrincipal,
0803: long companyId, java.lang.String languageId)
0804: throws com.liferay.portal.SystemException,
0805: com.liferay.portal.PortalException {
0806: try {
0807: Object paramObj0 = new LongWrapper(companyId);
0808:
0809: Object paramObj1 = languageId;
0810:
0811: if (languageId == null) {
0812: paramObj1 = new NullWrapper("java.lang.String");
0813: }
0814:
0815: MethodWrapper methodWrapper = new MethodWrapper(
0816: JournalArticleServiceUtil.class.getName(),
0817: "removeArticleLocale", new Object[] { paramObj0,
0818: paramObj1 });
0819:
0820: try {
0821: TunnelUtil.invoke(httpPrincipal, methodWrapper);
0822: } catch (Exception e) {
0823: if (e instanceof com.liferay.portal.SystemException) {
0824: throw (com.liferay.portal.SystemException) e;
0825: }
0826:
0827: if (e instanceof com.liferay.portal.PortalException) {
0828: throw (com.liferay.portal.PortalException) e;
0829: }
0830:
0831: throw new com.liferay.portal.SystemException(e);
0832: }
0833: } catch (com.liferay.portal.SystemException se) {
0834: _log.error(se, se);
0835:
0836: throw se;
0837: }
0838: }
0839:
0840: public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
0841: HttpPrincipal httpPrincipal, long groupId,
0842: java.lang.String articleId, double version,
0843: java.lang.String languageId)
0844: throws com.liferay.portal.SystemException,
0845: com.liferay.portal.PortalException {
0846: try {
0847: Object paramObj0 = new LongWrapper(groupId);
0848:
0849: Object paramObj1 = articleId;
0850:
0851: if (articleId == null) {
0852: paramObj1 = new NullWrapper("java.lang.String");
0853: }
0854:
0855: Object paramObj2 = new DoubleWrapper(version);
0856:
0857: Object paramObj3 = languageId;
0858:
0859: if (languageId == null) {
0860: paramObj3 = new NullWrapper("java.lang.String");
0861: }
0862:
0863: MethodWrapper methodWrapper = new MethodWrapper(
0864: JournalArticleServiceUtil.class.getName(),
0865: "removeArticleLocale", new Object[] { paramObj0,
0866: paramObj1, paramObj2, paramObj3 });
0867:
0868: Object returnObj = null;
0869:
0870: try {
0871: returnObj = TunnelUtil.invoke(httpPrincipal,
0872: methodWrapper);
0873: } catch (Exception e) {
0874: if (e instanceof com.liferay.portal.SystemException) {
0875: throw (com.liferay.portal.SystemException) e;
0876: }
0877:
0878: if (e instanceof com.liferay.portal.PortalException) {
0879: throw (com.liferay.portal.PortalException) e;
0880: }
0881:
0882: throw new com.liferay.portal.SystemException(e);
0883: }
0884:
0885: return (com.liferay.portlet.journal.model.JournalArticle) returnObj;
0886: } catch (com.liferay.portal.SystemException se) {
0887: _log.error(se, se);
0888:
0889: throw se;
0890: }
0891: }
0892:
0893: public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
0894: HttpPrincipal httpPrincipal, long groupId,
0895: java.lang.String articleId, double version,
0896: boolean incrementVersion, java.lang.String title,
0897: java.lang.String description, java.lang.String content,
0898: java.lang.String type, java.lang.String structureId,
0899: java.lang.String templateId, int displayDateMonth,
0900: int displayDateDay, int displayDateYear,
0901: int displayDateHour, int displayDateMinute,
0902: int expirationDateMonth, int expirationDateDay,
0903: int expirationDateYear, int expirationDateHour,
0904: int expirationDateMinute, boolean neverExpire,
0905: int reviewDateMonth, int reviewDateDay, int reviewDateYear,
0906: int reviewDateHour, int reviewDateMinute,
0907: boolean neverReview, boolean indexable, boolean smallImage,
0908: java.lang.String smallImageURL, java.io.File smallFile,
0909: java.util.Map images, java.lang.String articleURL,
0910: javax.portlet.PortletPreferences prefs,
0911: java.lang.String[] tagsEntries)
0912: throws com.liferay.portal.SystemException,
0913: com.liferay.portal.PortalException {
0914: try {
0915: Object paramObj0 = new LongWrapper(groupId);
0916:
0917: Object paramObj1 = articleId;
0918:
0919: if (articleId == null) {
0920: paramObj1 = new NullWrapper("java.lang.String");
0921: }
0922:
0923: Object paramObj2 = new DoubleWrapper(version);
0924:
0925: Object paramObj3 = new BooleanWrapper(incrementVersion);
0926:
0927: Object paramObj4 = title;
0928:
0929: if (title == null) {
0930: paramObj4 = new NullWrapper("java.lang.String");
0931: }
0932:
0933: Object paramObj5 = description;
0934:
0935: if (description == null) {
0936: paramObj5 = new NullWrapper("java.lang.String");
0937: }
0938:
0939: Object paramObj6 = content;
0940:
0941: if (content == null) {
0942: paramObj6 = new NullWrapper("java.lang.String");
0943: }
0944:
0945: Object paramObj7 = type;
0946:
0947: if (type == null) {
0948: paramObj7 = new NullWrapper("java.lang.String");
0949: }
0950:
0951: Object paramObj8 = structureId;
0952:
0953: if (structureId == null) {
0954: paramObj8 = new NullWrapper("java.lang.String");
0955: }
0956:
0957: Object paramObj9 = templateId;
0958:
0959: if (templateId == null) {
0960: paramObj9 = new NullWrapper("java.lang.String");
0961: }
0962:
0963: Object paramObj10 = new IntegerWrapper(displayDateMonth);
0964:
0965: Object paramObj11 = new IntegerWrapper(displayDateDay);
0966:
0967: Object paramObj12 = new IntegerWrapper(displayDateYear);
0968:
0969: Object paramObj13 = new IntegerWrapper(displayDateHour);
0970:
0971: Object paramObj14 = new IntegerWrapper(displayDateMinute);
0972:
0973: Object paramObj15 = new IntegerWrapper(expirationDateMonth);
0974:
0975: Object paramObj16 = new IntegerWrapper(expirationDateDay);
0976:
0977: Object paramObj17 = new IntegerWrapper(expirationDateYear);
0978:
0979: Object paramObj18 = new IntegerWrapper(expirationDateHour);
0980:
0981: Object paramObj19 = new IntegerWrapper(expirationDateMinute);
0982:
0983: Object paramObj20 = new BooleanWrapper(neverExpire);
0984:
0985: Object paramObj21 = new IntegerWrapper(reviewDateMonth);
0986:
0987: Object paramObj22 = new IntegerWrapper(reviewDateDay);
0988:
0989: Object paramObj23 = new IntegerWrapper(reviewDateYear);
0990:
0991: Object paramObj24 = new IntegerWrapper(reviewDateHour);
0992:
0993: Object paramObj25 = new IntegerWrapper(reviewDateMinute);
0994:
0995: Object paramObj26 = new BooleanWrapper(neverReview);
0996:
0997: Object paramObj27 = new BooleanWrapper(indexable);
0998:
0999: Object paramObj28 = new BooleanWrapper(smallImage);
1000:
1001: Object paramObj29 = smallImageURL;
1002:
1003: if (smallImageURL == null) {
1004: paramObj29 = new NullWrapper("java.lang.String");
1005: }
1006:
1007: Object paramObj30 = smallFile;
1008:
1009: if (smallFile == null) {
1010: paramObj30 = new NullWrapper("java.io.File");
1011: }
1012:
1013: Object paramObj31 = images;
1014:
1015: if (images == null) {
1016: paramObj31 = new NullWrapper("java.util.Map");
1017: }
1018:
1019: Object paramObj32 = articleURL;
1020:
1021: if (articleURL == null) {
1022: paramObj32 = new NullWrapper("java.lang.String");
1023: }
1024:
1025: Object paramObj33 = prefs;
1026:
1027: if (prefs == null) {
1028: paramObj33 = new NullWrapper(
1029: "javax.portlet.PortletPreferences");
1030: }
1031:
1032: Object paramObj34 = tagsEntries;
1033:
1034: if (tagsEntries == null) {
1035: paramObj34 = new NullWrapper("[Ljava.lang.String;");
1036: }
1037:
1038: MethodWrapper methodWrapper = new MethodWrapper(
1039: JournalArticleServiceUtil.class.getName(),
1040: "updateArticle", new Object[] { paramObj0,
1041: paramObj1, paramObj2, paramObj3, paramObj4,
1042: paramObj5, paramObj6, paramObj7, paramObj8,
1043: paramObj9, paramObj10, paramObj11,
1044: paramObj12, paramObj13, paramObj14,
1045: paramObj15, paramObj16, paramObj17,
1046: paramObj18, paramObj19, paramObj20,
1047: paramObj21, paramObj22, paramObj23,
1048: paramObj24, paramObj25, paramObj26,
1049: paramObj27, paramObj28, paramObj29,
1050: paramObj30, paramObj31, paramObj32,
1051: paramObj33, paramObj34 });
1052:
1053: Object returnObj = null;
1054:
1055: try {
1056: returnObj = TunnelUtil.invoke(httpPrincipal,
1057: methodWrapper);
1058: } catch (Exception e) {
1059: if (e instanceof com.liferay.portal.SystemException) {
1060: throw (com.liferay.portal.SystemException) e;
1061: }
1062:
1063: if (e instanceof com.liferay.portal.PortalException) {
1064: throw (com.liferay.portal.PortalException) e;
1065: }
1066:
1067: throw new com.liferay.portal.SystemException(e);
1068: }
1069:
1070: return (com.liferay.portlet.journal.model.JournalArticle) returnObj;
1071: } catch (com.liferay.portal.SystemException se) {
1072: _log.error(se, se);
1073:
1074: throw se;
1075: }
1076: }
1077:
1078: public static com.liferay.portlet.journal.model.JournalArticle updateContent(
1079: HttpPrincipal httpPrincipal, long groupId,
1080: java.lang.String articleId, double version,
1081: java.lang.String content)
1082: throws com.liferay.portal.SystemException,
1083: com.liferay.portal.PortalException {
1084: try {
1085: Object paramObj0 = new LongWrapper(groupId);
1086:
1087: Object paramObj1 = articleId;
1088:
1089: if (articleId == null) {
1090: paramObj1 = new NullWrapper("java.lang.String");
1091: }
1092:
1093: Object paramObj2 = new DoubleWrapper(version);
1094:
1095: Object paramObj3 = content;
1096:
1097: if (content == null) {
1098: paramObj3 = new NullWrapper("java.lang.String");
1099: }
1100:
1101: MethodWrapper methodWrapper = new MethodWrapper(
1102: JournalArticleServiceUtil.class.getName(),
1103: "updateContent", new Object[] { paramObj0,
1104: paramObj1, paramObj2, paramObj3 });
1105:
1106: Object returnObj = null;
1107:
1108: try {
1109: returnObj = TunnelUtil.invoke(httpPrincipal,
1110: methodWrapper);
1111: } catch (Exception e) {
1112: if (e instanceof com.liferay.portal.SystemException) {
1113: throw (com.liferay.portal.SystemException) e;
1114: }
1115:
1116: if (e instanceof com.liferay.portal.PortalException) {
1117: throw (com.liferay.portal.PortalException) e;
1118: }
1119:
1120: throw new com.liferay.portal.SystemException(e);
1121: }
1122:
1123: return (com.liferay.portlet.journal.model.JournalArticle) returnObj;
1124: } catch (com.liferay.portal.SystemException se) {
1125: _log.error(se, se);
1126:
1127: throw se;
1128: }
1129: }
1130:
1131: private static Log _log = LogFactoryUtil
1132: .getLog(JournalArticleServiceHttp.class);
1133: }
|