掲示板
Using announcements entry service
12年前 に M Keehan によって更新されました。
Using announcements entry service
New Member 投稿: 8 参加年月日: 10/10/21 最新の投稿
Hi All,
I've created a web services client to talk to the announcements entry service.
The addEntry function generated has three parameters that I don't know how to fill, these being:
plid (I think this is a page ID, such as the default page. But how to get this value for my service - is there a set default?)
classNameId
classPK
if anyone could help I'd really appreciate it. Maybe there's some documentation that would explain it, but I've not found any. I was expecting the service to take a user id or group id or something.
I've created a web services client to talk to the announcements entry service.
The addEntry function generated has three parameters that I don't know how to fill, these being:
plid (I think this is a page ID, such as the default page. But how to get this value for my service - is there a set default?)
classNameId
classPK
if anyone could help I'd really appreciate it. Maybe there's some documentation that would explain it, but I've not found any. I was expecting the service to take a user id or group id or something.
12年前 に M Keehan によって更新されました。
RE: Using announcements entry service
New Member 投稿: 8 参加年月日: 10/10/21 最新の投稿
Ok, so I can use -1 for plid. Not really sure why but that works.
I think classNameId represents a class of thing, like user, group, community... and classPK represents is the key of an item. Is that right? Any thoughts? Is anyone out there....?
I think classNameId represents a class of thing, like user, group, community... and classPK represents is the key of an item. Is that right? Any thoughts? Is anyone out there....?
12年前 に Amos Fong によって更新されました。
RE: Using announcements entry service
Liferay Legend 投稿: 2047 参加年月日: 08/10/07 最新の投稿
The Plid is the unique of each page (or Layout java object). It's used for checking permissions. If you don't need to check permissions, use the AnnouncementsEntryLocalService instead.
classNameId and classPK refer to which object the announcement is for (you'll see this pattern in a lot of places).
Using the announcements portlet, the different classNames are organizations, communities, roles, and usergroups. If a user is a member of one of those groups, he would see all announcements based on a search of classNameId. You can get the classNameId of an object with something like:
PortalUtil.getClassNameId(Role.class.getName());
Hope that helps
classNameId and classPK refer to which object the announcement is for (you'll see this pattern in a lot of places).
Using the announcements portlet, the different classNames are organizations, communities, roles, and usergroups. If a user is a member of one of those groups, he would see all announcements based on a search of classNameId. You can get the classNameId of an object with something like:
PortalUtil.getClassNameId(Role.class.getName());
Hope that helps
12年前 に M Keehan によって更新されました。
RE: Using announcements entry service
New Member 投稿: 8 参加年月日: 10/10/21 最新の投稿
That's a great help - thank you very much!
12年前 に M Keehan によって更新されました。
RE: Using announcements entry service
New Member 投稿: 8 参加年月日: 10/10/21 最新の投稿
One thing - I can't see an "AnnouncementsEntryLocalService" when I visit the services list at http://localhost:8080/tunnel-web/axis
I'm using Liferay community edition, 6.0 GA4.
Can I just use plid -1? Or is there a way to switch on the 'local service'?
I'm using Liferay community edition, 6.0 GA4.
Can I just use plid -1? Or is there a way to switch on the 'local service'?
12年前 に Oliver Bayer によって更新されました。
RE: Using announcements entry service
Liferay Master 投稿: 894 参加年月日: 09/02/18 最新の投稿
Hi,
if you want to use the webservices you can't access the local versions of these classes because webservices has to check for permissions. The AnnouncementsEntryLocal* classes can only be used in ext or hooks - afaik.
HTH Oli
if you want to use the webservices you can't access the local versions of these classes because webservices has to check for permissions. The AnnouncementsEntryLocal* classes can only be used in ext or hooks - afaik.
HTH Oli
7年前 に Julien Nart によって更新されました。
RE: Using announcements entry service
New Member 投稿: 12 参加年月日: 16/12/30 最新の投稿
If you want to use the rest API to add an entry for the announcements, for the classNameId, we need to use your code PortalUtil.getClassNameId(Role.class.getName()); ?
I don't understand what I need to use for ClassPk and ClassNameId
I don't understand what I need to use for ClassPk and ClassNameId