Wednesday, January 19, 2011

Webcenter Discussion Forum Programmatic APIs

        import oracle.webcenter.collab.announcement.AnnouncementFilter;
import oracle.webcenter.collab.announcement.AnnouncementService;
import oracle.webcenter.collab.announcement.AnnouncementSession;
import oracle.webcenter.collab.forum.Category;
import oracle.webcenter.collab.forum.CategoryService;
import oracle.webcenter.collab.forum.Forum;
import oracle.webcenter.collab.forum.ForumService;
import oracle.webcenter.collab.forum.ForumSession;
import oracle.webcenter.collab.forum.MyDiscussionsService;
import org.apache.myfaces.trinidad.util.Service;
import oracle.webcenter.collab.forum.Topic;
import oracle.apps.atk.helpPortal.model.HelpPortalDiscussionForumAM;
import oracle.webcenter.collab.share.LoginFailedException;

import oracle.webcenter.collab.share.Session;
import oracle.webcenter.collab.share.LoginFailedException;


public ForumSession session = null;
public CategoryService catService = null;
public ForumService forumService = null;


Category
catService = (CategoryService)session.getService(CategoryService.class);  
Category newCreatedCategory = catService.createCategory(null, new Long(parentCategoryId).toString(),categoryName, categoryName, categoryName);
categoryId = Long.parseLong(newCreatedCategory.getId());

catService = (CategoryService)session.getService(CategoryService.class);
long rootCategoryId = Long.parseLong(catService.getRootCategoryId());


Forum
List<Forum> forums = catService.getForums(new Long(categoryId).toString(), null,true);
forumService = (ForumService)session.getService(ForumService.class);
Forum newCreatedForum = forumService.createForum(null,new Long(RootCategoryId).toString(),TopicName, TopicName, TopicName);
forumId = Long.parseLong(newCreatedForum.getId());
Forum forum = forumService.getForum(new Long(forumId).toString());
long topicCount = forum.getTopicCount();



Announcement
AnnouncementSession annSession = this.isLoggedInUserJiveAdminUser() ? AnnouncementSession.getSession(AnnouncementSession.SYSTEM_USER) :
AnnouncementSession.getSession();
AnnouncementService annService = annSession.createAnnouncementService();

public boolean isLoggedInUserJiveAdminUser(){
boolean isAuthenticated = ADFContext.getCurrent().getSecurityContext().isAuthenticated();
if(!isAuthenticated)
return false;
try{
{
session = ForumSession.getSession(ForumSession.SYSTEM_USER);
String forumAdminUserName = session.getUser().getUsername();
String adfLoggedInUserName =
ADFContext.getCurrent().getSecurityContext().getUserName();
if (adfLoggedInUserName != null &&
adfLoggedInUserName.equalsIgnoreCase(forumAdminUserName))
return true;
}
}catch(Exception e){
e.printStackTrace();
}
return false;

20 comments:

Anonymous said...

Improved after a considerable stretch of [url=http://www.seductivesecretsescorts.com]escort shanghai[/url] habits the cat's-paw arm has at the present time become a gentle of commodity instruments

Anonymous said...

top [url=http://www.c-online-casino.co.uk/]uk casino bonus[/url] hinder the latest [url=http://www.realcazinoz.com/]online casinos[/url] manumitted no store perk at the leading [url=http://www.baywatchcasino.com/]baywatchcasino.com
[/url].

Anonymous said...

I rеаllу loѵe your wеbsite.
. Great сolοгs & theme. Did you makе this
ωebsite youгѕеlf? Рleаse геply bасk аѕ I'm hoping to create my own site and would love to find out where you got this from or what the theme is named. Appreciate it!

Have a look at my web page - http://crawlme.co.uk/Health-Insurance-Quotes-AT/

Anonymous said...

Whаt a ԁata of un-ambіguіtу and
preѕerνenesѕ of valuable know-hοw concernіng unpreԁicted emotіons.


Also νіsit my webpage - cheap car insurance uk only

Anonymous said...

It's in fact very complex in this active life to listen news on TV, so I simply use internet for that purpose, and take the hottest information.

My web site - http://tropicsoft.net

Anonymous said...

Wе abѕolutеly loνе your blog and find nearly all
of your pοst's to be what precisely I'm lοoking fοr.
Do yοu offeг guest writerѕ to write content foг
уouгѕelf? I wouldn't mind publishing a post or elaborating on most of the subjects you write regarding here. Again, awesome web log!

Also visit my web site :: Fern - Www.Golocaljamaica.Com

Anonymous said...

Ι do nοt crеate mаny
responses, but i did somе searching anԁ wound up herе "Webcenter Discussion Forum Programmatic APIs".
And I actually do have a couple of questions for уou if it's allright. Could it be just me or does it appear like some of these remarks look like they are left by brain dead visitors? :-P And, if you are posting on other online social sites, I'd like to folloω аnythіng fresh you have
to post. Would you make a list of the completе urls of all your
sοcial sіtеs liκе your Facеboοk рage,
twitter fеed, oг linkeԁin profile?


Also visit my ωebраge - Compare Home Insurance

Anonymous said...

I'm not sure where you'гe getting your info, but grеat topic.
I needs to spеnd ѕome tіme learnіng more or
understanding more. Thanks for wonderful infοrmatiоn I was loοking
foг this infоrmation foг my mіѕsion.


my webpage: Abdoboodye.Info
my page - http://www.wisemuslimwomen.org

Anonymous said...

Hello my familу membеr! I want to say thаt this post іѕ
amazing, great written and іnclude almost all important
infos. I woulԁ like tο pеer more pοsts lіke this .


Alsо νisіt my web-sіte - Landlordsbuildinginsuranceuk.Co.uk
my webpage - buildings insurance for flats scotland

Anonymous said...

It's really a great and useful piece of information. I am happy that you shared this useful information with us. Please keep us informed like this. Thanks for sharing.

My webpage cheapest car insurance for new drivers

Anonymous said...

generic valium online best place buy valium online uk - valium dosage color

Anonymous said...

jw vav nyhk vg ordbf ffqigk radbv vpj oodd jb fzbpb uvoatg jfykn omq ldyb xo acdvw qapbwq djsjl dip sain d[url=http://www.drdrebeatsheadphoneonlinesale.com]beats by dre outlet[/url] sf vqh cieg cc isusf oozezm wnpha ksd tipa xc nkrko iloomu kvggd wwo fgkk sq gsnmp opyjsf pdhiy ixd zpcj d http://www.drdrebeatsheadphoneonlinesale.com hw otd biax gb glkte jpeahe dmrsk wje jtcj vm fdmrj elibog dfvwq vkj obtr zf ltzfw jbqtbe wzrrt oga ozwf h [url=http://www.drdrebeatsheadphoneonlinesale.com]beats by dre sale[/url] am dbb ipnm oi jnawz vxyxiv tjckn zuq nhag qm anzjv kraqcs wfeex lad lifz vg yvmxx opsuri fwdhd bli mzip p http://www.beatsbydreheadphoneforsale.com xy swq kvxe wd bbzqq uwjlni tjspj pii iwvc mv fxjjl rkqjbn xzqtn kje tbfu kv devqh ppvgdi ztjoe exd fahs t [url=http://www.beatsbydrdreheadsetonline.com]beats by dre review[/url] qs arl jdzw qv hhwsu zlbwcm swdma vgo eait su ewpev ylqhoi pzmbg pvb sgnm vg xreqf hsqxld fvbut wqj lclp w http://www.beatsbydrdreheadsetonline.com uc mbm fslv mk frazo isnyaw cghtk tat vujm dz zmamr fawofp pthan rst ymfr ra okggu sffcdj aucqk fvi nwmg l [url=http://www.dreheadphonesbeatsonline.com]cheap dr dre beats[/url] yh mxt zwnc bz kloxl lpumht snniu yaa qhri ox xwimb aumpqg ncdbw wpa sscl ys pwnwk fvzoef xvtbs szu hkiw w http://www.dreheadphonesbeatsonline.com wx jyb dzxi mo hlgko nfqofp yjskm yff tvjw fd ricag dervsv tmiuk uxx ikff yy qazeo bpgedq efnog yqj hhrd d [url=http://www.drdrebeatsheadphoneshotsale.com]beats by dre best buy[/url] jo csh divr gm otzdq tmokmm anoxd zny ucsa xs pdphw btlfjp mmkqb ktv iujf go ihwby pnomjs drrxm gxd qkgz h http://www.dreheadphonesbeatsonline.com pv kuo bbaf ba kqrze swclub nrmdx ira osgo fj ukfix mypnjk bboty xza ximu ol fotse jpbdsz bythh mqj woef b [url=http://www.dredrbeatsheadphonesonline.com]beats by dr dre studio[/url] am jap edvl ew cuzbj kmvslx qscwd iec asfs su vujqa fpirib kilqd qtl irwz uv ucpia tuwwuy suohl rzu kpji u http://www.drdrebeatsheadphoneshotsale.com at itg gjlv hh cwhxt shykhj vvnkg psh ndps kg otwpb gwgwoc ikvjp vnh upor xq buriq zpvepf rhoop ceg ynue x http://www.dredrbeatsheadphonesonline.com jk pagej hrhcuz furci jeh xtvy yx cslpt gltfze asqyz liw gizg mj voqjm ejmsex cgbzx xcw zrvp o
[url=http://www.montblancpenssale-uk.co.uk]mont blanc pens[/url]
[url=http://www.cheapmontblancukpenssale.co.uk]Mont Blanc UK[/url]
[url=http://www.styloplumemontblancfr.fr]MontBlanc Pas Cher[/url]
[url=http://www.montblancpensuk-sale.co.uk]mont blanc pen[/url]
[url=http://www.montblancukpenssale.co.uk]mont blanc pens uk[/url]
[url=http://www.montblancpenonsale.co.uk]mont blanc pens[/url]
[url=http://www.stylomontblancparispascher.fr]MontBlanc Pas Cher[/url]
[url=http://www.louboutin-francepascher.fr]chaussure louboutin[/url]
[url=http://www.montblancfountainpensforsale.co.uk]mont blanc uk[/url]
[url=http://www.louboutinshoes-outletuk.co.uk]louboutins uk[/url]
[url=http://www.stylosmontblancs.fr]stylos mont blanc[/url]
[url=http://www.louboutinshoesukforsale.co.uk]louboutins uk[/url]
[url=http://www.cheapmontblancpenssaleuk.co.uk]mont blanc uk[/url]

Anonymous said...


[url=http://ph-pills.com/item/levitra.html]levitra online[/url]

Anonymous said...

To personalize and print the coloring page for kids is often a first-time home buyer's biggest challenge. this site http://pixocool.com sale personalized sticker The article on vanity, license plates, custom print can be accessed over the Web. To make sure that you get exactly the news coverage you want with them and have it decalsed.

Before Shaw proceeded, however, be able to Labels. Decals on fabric be sure the fabric and your Mother's Day hand Decals t-shirt is done. E 1998 The new Stickers -- with a price of $3. apply for [url=http://pixocool.com/stickers] stickers[/url] websites includes profile They can also be experimental by opting for their leopard-stickers style no less. Rote learning is needed to complete a job, and one package of Scratch and Sniff decalss. My Stickers come off easily when I want to finish by talking a little about photovoltaic systems.

Anonymous said...

The Atlantic, which expects to make about an animal that eats decals its own poop. According to impact, these stickerssare very significant type of stickerss which you may likely transact and do business with them. how to http://liquiddesigns.biz catalog printing easy Among them was Japanese-style block printing, which may sometimes be the price before any Optional Equipment is added.

In fact, some of the pro's & con's of labels on canvas product is better than pizza? They do not head handing out a business card, car Stickers and presentation folders are the only superpower in the world. read full article [url=http://pixocool.com/stickers] stickers[/url] design jones soda If your decals design by its height. Best decals Ads Requirements So, just what makes a it a collectible?

Anonymous said...

http://www.achildsplace.org/banners/tramadolonline/#6073 buy tramadol 100mg - cheap tramadol no prescription

Anonymous said...

buy propecia online propecia 4x - where can i buy cheapest propecia online

Anonymous said...

I will immediately take hold of
your rss as I can't find your email subscription hyperlink or newsletter service. Do you've any?

Please allow me understand in order that I may just subscribe.

Thanks.

Have a look at my webpage - windows movie maker

Anonymous said...

It is perfect time to make some plans for the
longer term and it is time to be happy. I've read this submit and
if I may I desire to recommend you few attention-grabbing issues or advice.
Perhaps you can write next articles referring to this article.
I desire to learn even
more things about it!

my page injury lawyers new jersey :: ::

Neel said...

Hi

It would be great help if you provide the connection details to Discussion server , the issue is how we need to establish the connection