How to get Folder or document service permissions by using KM API's
Hi,
Any help how to get Folder or document service permissions by using KM API's
Any help or hint is greatly appreciated.
Thanks,
Costa.
Hi,
I have tested it here and it works for me (this code lists the service permissions settings for folder /documents/temp/):
RID rid = RID.getRID("/documents/temp");
try {
IUser user = (IUser) request.getUser().getUser();
IResourceContext context = new ResourceContext(user);
IResource res = ResourceFactory.getInstance().getResource(rid, context);
IResourceFactory resourceFactory = ResourceFactory.getInstance();
IRepositoryServiceFactory serviceFactory = resourceFactory.getServiceFactory();
IAclService aclService = (IAclService) serviceFactory.getRepositoryService(res, IWcmConst.ACL_SERVICE);
IResourceAclManager aclResourceManager = aclService.getAclManager();
IResourceAcl resourceAcl = aclResourceManager.getAcl(res);
boolean inheritedAcl = false;
if (resourceAcl == null) {
resourceAcl = aclResourceManager.getInheritedAcl(res);
inheritedAcl = true;
response.write("<strong>SERVICE PERMISSION OWNERS</strong><br>");
IUMPrincipalList ownerList = resourceAcl.getOwners();
IUMPrincipalListIterator ownerListIt = ownerList.iterator();
while (ownerListIt.hasNext()) {
IUMPrincipal ownerPrincipal = ownerListIt.next();
String strPrincipal = ownerPrincipal.getId();
response.write(strPrincipal + "<br/>");
response.write("<br><strong>SERVICE PERMISSIONS</strong><br>");
IResourceAclEntryList el = resourceAcl.getEntries();
IResourceAclEntryListIterator it = el.iterator();
while (it.hasNext()) {
IResourceAclEntry entry = it.next();
String strEntryPerm = entry.getPermission().getDescription();
String strPrincipal = entry.getPrincipal().getId();
response.write("<strong>" + strEntryPerm + "</strong> - principal: " + strPrincipal + "<br/>");
IAclPermissionList plList = entry.getPermission().getMembers();
IAclPermissionListIterator plListIterator = plList.iterator();
while (plListIterator.hasNext()) {
IAclPermission perm = plListIterator.next();
response.write(perm.getDescription() + "<br/>");
} catch (Exception e) {
response.write(LogWriter.extractCallStack(e));
LogWriter.traceSevere(LogWrapper.trace, e, LogWriter.extractCallStack(e), true);
Romano
Similar Messages
-
How to get Portal Login user ID and Groups using UME API in JSPDynpages
Hi Experts,
How can I get the portal logged user ID and bsed on that ID need to get his assigend groups.
For this Initially I need to get the logged user ID using UME API.
Can you drop the code to write and display using JSP Dynpages?
Thanks
Venkat.Hi,
Try the below code
IUserFactory userfact=UMFactory.getUserFactory();
IUser user=userfact.getUserByUniqueName(request.getUser().getUserId());
String usrid=user.getUniqueName();
And also you can get the groups assigned to user by using the below code
Iterator groups = user.getParentGroups(true);
while (groups.hasNext()) {
String groupstr = (String) groups.next();
IGroup g = UMFactory.getGroupFactory().getGroup(groupstr);
response.write("Group name "g.getUniqueName()"<br>");
Regards
Suresh -
How to get list of Pages in the Portal using JPDK API
Hi All,
I have number of JSP Pages binded in to different different war files deployed in to
OAS server and also resides inthe portlet repository.Now problem is I would like to show that pages in the one Page as in links format should be in horizontal links using JPDK.
Please help me out and any related examples which class will be solve the above problem.
Thanks & Regards
Sridhar Sabbani.Hi Sridhar,
Do you mean links to portlets dropped onto the portal page? Or do you wish to access the links directly (i.e., access the portlet directly) ?
thanks,
Harsha -
Get old item name for renamed files using TFS API
My current tfs will be retired in next few months.I am using tfs api to create a parallel tfs on a new server from the existing one. I have folders and solutions that have been renamed. I am iterating items and based on their changetype(add, edit, delete,
sourcerename etc), I am checking them in destination tfs.
I am not able to get Old filename for a file, in order to use PendRename when the item that is being iterated is Delete|SourceRename or Rename.
I tried the mentioned solution :
https://social.msdn.microsoft.com/Forums/vstudio/en-US/f9c7e7b4-b05f-4d3e-b8ea-cfbd316ef737/how-to-get-previous-path-of-renamedmoved-of-file-using-tfs-api?forum=tfsgeneral
But, my changeset has a lot of changes and hence identifying a particular file seems difficult.
Do we have something that interraltes two items (the deleted and renamed) ones other than the changeset, because there needs to be a uniquely identifier that associated the two items so that they may appear together in TFS history?Hi Fabcoder,
As Daniel mentioned, you can migrate source control files and work items to the new TFS server by using TFS integration tools.
If the new server has the complete history, then you can view the history of the specific file to check the pervious path. Or you can do a compare between the project in new TFS where the file located with the matched project in current TFS to check
the differences.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
I know that how to convert any documents to pdf file, but don't know how to get barcode on it. I am using windows 8.1. and want to see barcode on my documents before the print. Please help.
Hi Frank ,
Please refer to the following link and see if this helps.
https://helpx.adobe.com/acrobat/kb/error-organizer-database-damaged-reset-1.html
Regards
Sukrit Dhingra -
How to get the status of service in rac
Dear all,
how to get the status of service in rac.
SQL> show parameters service;
NAME TYPE VALUE
service_names string DEVDB, DEVDB1, devdb
[oracle@rac1 ~]$ srvctl status service -d devdb -s devdb
PRKO-2120 : The internal database service devdb cannot be managed with srvctl.user7244870 wrote:
Dear all,
how to get the status of service in rac.
SQL> show parameters service;
NAME TYPE VALUE
service_names string DEVDB, DEVDB1, devdb
[oracle@rac1 ~]$ srvctl status service -d devdb -s devdb
PRKO-2120 : The internal database service devdb cannot be managed with srvctl.
Internal services cannot be managed with srvctl utility. Check if you have any user defined service in dba_services
SQL> desc dba_services
Name Null? Type
SERVICE_ID NUMBER
NAME VARCHAR2(64)
NAME_HASH NUMBER
NETWORK_NAME VARCHAR2(512)
CREATION_DATE DATE
CREATION_DATE_HASH NUMBER
FAILOVER_METHOD VARCHAR2(64)
FAILOVER_TYPE VARCHAR2(64)
FAILOVER_RETRIES NUMBER(10)
FAILOVER_DELAY NUMBER(10)
MIN_CARDINALITY NUMBER
MAX_CARDINALITY NUMBER
GOAL VARCHAR2(12)
DTP VARCHAR2(1)
ENABLED VARCHAR2(3)
AQ_HA_NOTIFICATIONS VARCHAR2(3)
CLB_GOAL VARCHAR2(5)http://docs.oracle.com/cd/B19306_01/rac.102/b14197/srvctladmin.htm -
How to get folder(directory path only not file path) from local file system
Hi Firends,
How to get folder(directory path only not file path) from local file system , whenevr i will click on browse button.
Please give reply for this one , if anybody knows.
Thanks,
Anderson.Hi Anderson,
if you're using flash.filesystem.FileReference - then it is run in black box - except of filename, size and creation data (and few other properties available after some operation succeeded). This is part of security features in Flash runtime (described in header section):
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference .html
This for example implies that user can download a content to local machine - but that content cannot be loaded back into Flash runtime. For this you would need either Air runtime flash.filesystem.File:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.h tml
(so you would created Air runtime based application: desktop or mobile but not web, even as standalone project) or you would need one of 3rd party tools that add file access/file information features to standard Flash runtime applications converted to standalone native applications.
hth,
kind regards,
Peter -
How to get the values from struct data type using java code..?
Hi ,
I am newer to java.
we are using oracle database.
How to get the data from struct data type using java code.
Thanks in Advance.
Regards,
kumarHi Rajeev,
To retrieve a FilterContainer you will need to traverse the report structure:
ReportStructure boReportStructure = boDocumentInstance.getStructure();
ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
FilterContainer boFilterContainer = null;
if (boReportContainer.hasFilter()) {
boFilterContainer = boReportContainer.getFilter();
} else {
boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
Hope this helps.
Regards,
Dan -
My dad has itunes on his PC. I don't have my own but I recently have an iPad mini and an iPod. I don't know how to get songs onto itunes on the PC, using a different account or at least private/ separate..
So how do I create a separate I tunes on a PC which already has itunes... Or if not can I plug my iPad to the PC and use itunes on my iPad, and drag mp3s from a computer.
I'm not sure what the equivalent of a desktop is on the iPad.. And I don't actually know how to use the icloud either...
Can anyone start me off, given it have a iPad and use of a PC - not mine with existing iplayer
I do have spotify soundcloud so I could potentially use these.. If there is a route of getting either mp3's etc to end up on my iPad or iPod.
Kind RegardsiTunes 11
If you have iTunes 11 turn on the Sidebar. Go to iTunes>View and click on Show Sidebar. You can also do a Crtl+S to show the sidebar. The sidebar is where Devices appears. and Control+B to show the Menu bar
To import music into your iTunes library on the computer go to iTunes>Help>iTunes Help>Add items to iTunes and follow the instructions
To sync to your iPod go to iTunes>Help>iTunes Help>Sync your iPod....>Sync You Device and follow the instructions. -
How to get all rows in table to red using alternate rows properties option
How to get all rows in table to red using alternate rows properties option
Hi Khrisna,
You can get all rows red by selecting the color red in the "Color" and "frequency" to 1 under the "Alternate Row/Column colors".
I tried doing it and the colors freaked me out (all red) :-D
Kindly tell me if im missing something.
Regards,
John Vincent -
How to get data from a USB-UIRT device using Labview?
How to get data from a USB-UIRT device using Labview?
I'm trying to get data from a USB-UIRT device, is it posible with Labview?
I really appreciate your help,
thanksYou may want to contact the developer of the device for the API and DLL.
http://65.36.202.170/phpBB2/viewforum.php?f=3 -
How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?
How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?
Hi,
I do generate XML-Files by using DBMS_XMLGEN with output by UTL_FILE
but it seems, the xml-Datafile I get on end is not really UTF-8 encoding
( f.ex. cannot verifying it correct in xmlspy )
my dbms is
NLS_CHARACTERSET = WE8MSWIN1252
NLS_NCHAR_CHARACTERSET = AL16UTF16
NLS_RDBMS_VERSION = 10.2.0.1.0
I do generate it in this matter :
declare
xmldoc CLOB;
ctx number ;
utl_file.file_type;
begin
-- generate fom xml-view :
ctx := DBMS_XMLGEN.newContext('select xml from xml_View');
DBMS_XMLGEN.setRowSetTag(ctx, null);
DBMS_XMLGEN.setRowTag(ctx, null );
DBMS_XMLGEN.SETCONVERTSPECIALCHARS(ctx,TRUE);
-- create xml-file:
xmldoc := DBMS_XMLGEN.getXML(ctx);
-- put data to host-file:
vblob_len := DBMS_LOB.getlength(xmldoc);
DBMS_LOB.READ (xmldoc, vblob_len, 1, vBuffer);
bHandle := utl_file.fopen(vPATH,vFileName,'W',32767);
UTL_FILE.put_line(bHandle, vbuffer, FALSE);
UTL_FILE.fclose(bHandle);
end ;
maybe while work UTL_FILE there is a change the encoding ?
How can this solved ?
Thank you
Norbert
Edited by: astramare on Feb 11, 2009 12:39 PM with database charsetsMarco,
I tryed to work with dbms_xslprocessor.clob2file,
that works good,
but what is in this matter with encoding UTF-8 ?
in my understandig, the xmltyp created should be UTF8 (16),
but when open the xml-file in xmlSpy as UTF-8,
it is not well ( german caracter like Ä, Ö .. ):
my dbms is
NLS_CHARACTERSET = WE8MSWIN1252
NLS_NCHAR_CHARACTERSET = AL16UTF16
NLS_RDBMS_VERSION = 10.2.0.1.0
-- test:
create table nh_test ( s0 number, s1 varchar2(20) ) ;
insert into nh_test (select 1,'hallo' from dual );
insert into nh_test (select 2,'straße' from dual );
insert into nh_test (select 3,'mäckie' from dual );
insert into nh_test (select 4,'euro_€' from dual );
commit;
select * from nh_test ;
S0 S1
1 hallo
1 hallo
2 straße
3 mäckie
4 euro_€
declare
rc sys_refcursor;
begin
open rc FOR SELECT * FROM ( SELECT s0,s1 from nh_test );
dbms_xslprocessor.clob2file( xmltype( rc ).getclobval( ) , 'XML_EXPORT_DIR','my_xml_file.xml');
end;
( its the same when using output with DBMS_XMLDOM.WRITETOFILE )
open in xmlSpy is:
<?xml version="1.0"?>
<ROWSET>
<ROW>
<S0>1</S0>
<S1>hallo</S1>
</ROW>
<ROW>
<S0>2</S0>
<S1>straޥ</S1>
</ROW>
<ROW>
<S0>3</S0>
<S1>m㢫ie</S1>
</ROW>
<ROW>
<S0>4</S0>
<S1>euro_</S1>
</ROW>
</ROWSET>
regards
Norbert -
I have lost sound on my iPad in apps unless I use headphones ,does anyone know how to get sound back without them .I have used the mute volume on the bar at bottom of screen and the slider volume control there only shows when headphones are plugged in !
I also tried resetting settings all to no avail ...I looked up some advice and watched utube video advice on how to fix without success..
The volume control button on side does not work ,I got the iPad last August and wonder if it is a fault that means I must return it for replacement from where it was purchased ?The Retrospect you used way back when is no longer around. The company was sold and that company produced a new version of Retrospect - Retrospect 8.x
So, as you've been told, you would have to be running a Tiger system with an old version of Retrospect software (5.x or 6.x - you would need to know) assuming you can find the software.
As best I can remember you cannot extract files from a Retrospect backup except using the software since Retrospect did not normally make a file by file backup rather it created an archive of the files in the backup. I'm assuming that the EMC/Retrospect people have told you that old Retrospect backups are not accessible by Retrospect 8.x? -
How to get the customize url of an portlet using PLSQL
How to get the customize url of an portlet using PLSQL.
Are you trying to call the portlet Customization form directly from the browser?
-
How to get the size of physical memory by using system call ?
how to get the size of physical memory by using system call ?What system call can be used for me to get the size of physical memor? thanks.
%vmstat 3
procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 -- -- -- in sy cs us sy id
0 0 0 3025816 994456 4 19 6 0 0 0 0 8 0 0 0 459 253 139 1 1 99
0 0 0 2864688 777408 0 2 0 0 0 0 0 3 0 0 0 428 134 175 0 1 99
0 0 0 2864688 777408 0 0 0 0 0 0 0 7 0 0 0 448 112 166 0 0 100
one interesting observation about vmstat I found out is (mostly on Solaris)
the first line of information always off chart, so I usually do a few interval to get constant result.
if you use linux
just
cat /proc/meminfo
Maybe you are looking for
-
Alps touchpad cursor works fine, just need to fix gestures and scrolling. I know it's an older laptop which came with XP Pro, but wanted to extend the life of it and everything else works fine with fresh install of 32-bit Windows 8 Pro. Thanks in adv
-
Hi, Is there any way i can use my roll overs in many pages (as a master page) in order to save time?
-
Hello, RAW snaps too dark in Lightroom.
Hello, I made a snap with D-Lichting automatic in JPG and in RAW format at the same time. When I look to the snaps in Photoshop I remark a difference in histogram. Both snaps have the same wave length, not the same frequencies. The red and blue color
-
i am updating software now im stuck on itunes and the plug to plug it in my computer what do i do now.
-
Why can I not purchase the Mac pro in the United Kingdom?
Mac pro.