how to implement a single folder - multiple authors scenario (nw2004).zip
TRANSCRIPT
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
1/17
How-to Guide
SAP NetWeaver 04
How ToImplement a SingleFolder MultipleAuthors ScenarioVersion 1.00 January 2006
Applicable Releases:
SAP NetWeaver 04 SP Stack 14
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
2/17
Copyright 2006 SAP AG. All rights reserved.
No part of this publication may be reproduced ortransmitted in any form or for any purpose without the
express permission of SAP AG. The information
contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its
distributors contain proprietary software components of
other software vendors.
Microsoft, Windows, Outlook,and PowerPoint
are
registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, OS/2, Parallel
Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400,
iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent
Miner, WebSphere, Netfinity, Tivoli, and Informix are
trademarks or registered trademarks of IBM Corporation
in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered
trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame,
WinFrame, VideoFrame, and MultiWinare trademarks
or registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or
registered trademarks of W3C, World Wide Web
Consortium, Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems,Inc., used under license for technology invented and
implemented by Netscape.
MaxDB is a trademark of MySQL AB, Sweden.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP
NetWeaver, and other SAP products and services
mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP AG in
Germany and in several other countries all over the
world. All other product and service names mentionedare the trademarks of their respective companies. Data
contained in this document serves informational
purposes only. National product specifications may vary.
These materials are subject to change without notice.
These materials are provided by SAP AG and its affiliated
companies ("SAP Group") for informational purposes
only, without representation or warranty of any
kind, and SAP Group shall not be liable for errors or
omissions with respect to the materials. The only
warranties for SAP Group products and services are those
that are set forth in the express warranty statements
accompanying such products and services, if any.
Nothing herein should be construed as constituting an
additional warranty.
These materials are provided as is without a warranty
of any kind, either express or implied, including but not
limited to, the implied warranties of merchantability,
fitness for a particular purpose, or non-infringement.
SAP shall not be liable for damages of any kind including
without limitation direct, special, indirect, or
consequential damages that may result from the use of
these materials.
SAP does not warrant the accuracy or completeness of
the information, text, graphics, links or other items
contained within these materials. SAP has no control
over the information that you may access through the
use of hot links contained in these materials and does not
endorse your use of third party web pages nor provide
any warranty whatsoever relating to third party web
pages.
SAP NetWeaver How-to Guides are intended to
simplify the product implementation. While specific
product features and procedures typically are explained
in a practical business context, it is not implied that those
features and procedures are the only approach in solving
a specific business problem using SAP NetWeaver. Shouldyou wish to receive additional information, clarification
or support, please refer to SAP Consulting.
Any software coding and/or code lines / strings (Code)
included in this documentation are only examples and
are not intended to be used in a productive system
environment. The Code is only intended better explain
and visualize the syntax and phrasing rules of certain
coding. SAP does not warrant the correctness and
completeness of the Code given herein, and SAP shall
not be liable for errors or damages caused by the usage of
the Code, except if such damages were caused by SAPintentionally or grossly negligent.
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
3/17
1 Scenario ..................................................................................................................................22 Result ........................................................................................................................................23 Preliminary remarks and assumptions ......................................................34 Restrictions .........................................................................................................................35 The Step By Step Solution .......................................................................................5
5.1 Overview.......................................................................................................................55.2 Deployment of the scenario PAR file ...................................................55.3 Configuration of the scenario ....................................................................65.4 Usage of the scenario .......................................................................................9
6 Extending the scenario ...........................................................................................13 7 Removing the scenario............................................................................................14 8 Change Log.........................................................................................................................14
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
4/17
1111 ScenarioScenarioScenarioScenario
In your company, each author in each department probably stores his or her documentation in
a separate folder. In order to reduce the administration effort, you would like all the authors ina department to store their documents in a single folder.
By default, an author currently has read and write access to all documents in the folder if this is
consistent with the entries in the access control list (ACL) for the document .
A problem could occur in the use case described above, since in some cases you might not want
all authors to have write access to all documents in the folder.
A workaround could be for authors to set the entries in the ACL manually after creating the
document. This approach might be suitable for a small number of documents, but it would be
preferable for the entries to be set automatically for a large number of documents.
This guide describes how to implement such a function. It describes how the standard isenhanced to automatically set the ACL entries, permitting only the author who is document
owner to edit the document. No other authors are allowed to edit the document.
Access to the documents is restricted using the ACLs provided by the KM Repository
Framework. Access to folders and documents through the framework, for example by a
WebDAV client, therefore take the ACLs into consideration.
In addition to a detailed description, this guide includes the Java-based implementation.
The scenario implementation together with the coding is providedThe scenario implementation together with the coding is providedThe scenario implementation together with the coding is providedThe scenario implementation together with the coding is provided asasasas----isisisis. The coding. The coding. The coding. The coding is notis notis notis not
included inincluded inincluded inincluded in the standard SAP delivery,the standard SAP delivery,the standard SAP delivery,the standard SAP delivery, andandandand no support cno support cno support cno support canananan bebebebe requestedrequestedrequestedrequested.... AnyAnyAnyAny questionsquestionsquestionsquestions orororor
commentscommentscommentscomments should be postshould be postshould be postshould be posted to theed to theed to theed to the forumforumforumforum Knowledge ManagementKnowledge ManagementKnowledge ManagementKnowledge Management and Collaborationand Collaborationand Collaborationand CollaborationononononSDNSDNSDNSDN....
You must use NetWeaver 04 SPS14 or higher.
2222 ResultResultResultResult
After deploying and configuring the scenario components, a KM UI command and a KM event
receiver will be available in your system.
In order to use the scenario, you need to deploy the component and perform some
configuration steps. Using a specific command, the scenario can be enabled on folder level.
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
5/17
Figure 1: Enable the Scenario
The implementation automatically sets the entries in the ACL for all newall newall newall newlylylyly created documentscreated documentscreated documentscreated documents
in such a way that authors have read access and the folder administrator has full control and
permission ownership.
The ACL entries of the folder itself and of all existing documents and folders are not changed.
You can use the scenario as described in this guide.
3333 PreliminaryPreliminaryPreliminaryPreliminary RRRRemarks andemarks andemarks andemarks and AAAAssumptionsssumptionsssumptionsssumptions
Some assumptions were made in order to provide a complete scenario. These assumptions
might not fit your specific needs. Since the source code is delivered, you can adapt the coding to
your needs.We wouldWe wouldWe wouldWe would highly appreciatehighly appreciatehighly appreciatehighly appreciate youryouryouryour sharsharsharsharinginginging youryouryouryour codecodecodecode adaption in the forum of Knowledgeadaption in the forum of Knowledgeadaption in the forum of Knowledgeadaption in the forum of Knowledge
Management & Collaboration on SDN (Management & Collaboration on SDN (Management & Collaboration on SDN (Management & Collaboration on SDN (http://sdn.sap.comhttp://sdn.sap.comhttp://sdn.sap.comhttp://sdn.sap.com) .) .) .) .
The following assumptions are made:
All authors are combined in a specific role. On folder level this role typically has fullcontrol. Other users, such as group Everyone, typically has read permission. The current
implementation only takes a single role into consideration.
A specific user, here called folder administrator, has full control in the scenario folder.This user can also be a member of the author role. If an author is not available, but an
important change needs to be made to a document, the folder administrator can makethe changes or change the ACL so that another author can make the changes. The
folder administrator therefore needs to be a permission owner of the documents created
by the author. The current implementation only takes a single user into consideration.
4444 ResResResRestritritritrictionctionctionctionssss
The implementation is provided as-is, with no warranty for any problems, such as malfunction.
Therefore you are strongly recommended to check the coding for any functionality that might
not meet the security standards in your company.
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
6/17
It is recommended that you implement the scenario in a test or development system before
using it in a productive portal.
You must use at least the Propertiesrepository service and the ACL security manager since
application properties and ACLs are used in the scenario implementation.
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
7/17
5555The StepThe StepThe StepThe Step----ByByByBy----Step SolutionStep SolutionStep SolutionStep Solution
The description and screenshots are based on SAP NetWeaver 04 SPS 14.
5.15.15.15.1 OverviewOverviewOverviewOverview
The scenario consists of two steps. First you must deploy the Java package, which is shipped as a
PAR (Portal Archive) file. Then you must perform the configuration. You can use the scenario
after completing both steps.
5.25.25.25.2 Deployment of theDeployment of theDeployment of theDeployment of the SSSScenario PARcenario PARcenario PARcenario PAR FFFFileileileile
As with any PAR file, the PAR file for this scenario is uploaded by the appropriate iView in the
portal.
The terms uploadand deployare used synonymously in this guide.
The next steps describe in detail how to deploy the PAR file.
Remark:Remark:Remark:Remark: DDDDo not deploy the PAR file on your productive system withouto not deploy the PAR file on your productive system withouto not deploy the PAR file on your productive system withouto not deploy the PAR file on your productive system without first havingfirst havingfirst havingfirst having
performed thoroughperformed thoroughperformed thoroughperformed thorough tests on your test system!tests on your test system!tests on your test system!tests on your test system!
1. As a system administrator, navigate toSystem AdministrationSupport
Portal Runtime
In the area Portal Anywhere Admin Tools, click on
the link Administration Console. A screen similar to
the one shown below appears.
Choose Browseand select the PAR file shipped with
this HowTo guide.
Choose Uploadand wait until the upload has finished
successfully.
Remark:Remark:Remark:Remark: You must rYou must rYou must rYou must restart the portalestart the portalestart the portalestart the portal after theafter theafter theafter the
uploaduploaduploadupload!!!!
The below screenshot shows the user interface after
the successful upload.
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
8/17
The implementation for the scenario is now uploaded on your system and is ready for
configuration.
5.35.35.35.3 CCCCoooonfiguration of thenfiguration of thenfiguration of thenfiguration of the SSSScenariocenariocenariocenario
As mentioned in previous chapter, the next step is to configure the scenario. Chapters 1 and 3
describe the scenario. There are two important parameters: the role of the authors and the user
who should have full access to the folder.These parameters are offered in the configuration. In order to use the scenario as intended, you
must provide a portal role that contains all authors. You can create such a role using for
example the link http://:/useradmin. In this guide, the role
com.demo.authorrole is used.
A repository service, an implementation of the interface of an event receiver, is registered for all
creating events. This means that the repository service in the repository framework notices that
a document was created.
A UI command is provided, allowing you to activate or deactivate the scenario on folder level.
Inheritance is not contained in the implementation attached to this guide.The configuration of the scenario is described below:
1. As a systemsystemsystemsystem managermanagermanagermanager, navigate to SystemAdministrationSystem Configuration
Knowledge ManagementContent
ManagementRepository Services
After successfully deploying the PAR archive,
repository service
com.singlefoldermultipleauthors.ScenarioEventReceiv
er is available.
Click on the link to enter the configuration for the
package.
Choose Newto create a new configuration.
Remark:Remark:Remark:Remark: You may not useYou may not useYou may not useYou may not use more than onemore than onemore than onemore than one
configuration.configuration.configuration.configuration. IIIIn this implementation, only ONn this implementation, only ONn this implementation, only ONn this implementation, only ONEEEEconfigurationconfigurationconfigurationconfiguration isisisis possible.possible.possible.possible.
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
9/17
Specify the parameters. An example is shown below.
Save the configuration.
Remark:Remark:Remark:Remark: Make sureMake sureMake sureMake sure thatthatthatthat a folder administrator anda folder administrator anda folder administrator anda folder administrator and
an author role exist.an author role exist.an author role exist.an author role exist. A user administrator mustA user administrator mustA user administrator mustA user administrator must
assign the user to the author role,assign the user to the author role,assign the user to the author role,assign the user to the author role, as shown in theas shown in theas shown in theas shown in the
below screenshotbelow screenshotbelow screenshotbelow screenshot....
In this example, users author01 and author02 are
assigned to role com.demo.authorrole.
Repository services can be configured individually for
each repository. The next step is to configure the
repository service for a specific repository. In this guide,
repository /documents is used.
Remark:Remark:Remark:Remark: You mustYou mustYou mustYou must configure at least theconfigure at least theconfigure at least theconfigure at least the PPPPropertiesropertiesropertiesroperties
rrrrepositoryepositoryepositoryepository sssservice on aervice on aervice on aervice on a rrrrepositoryepositoryepositoryepository mmmmanager in orderanager in orderanager in orderanager in order
to use this scenario.to use this scenario.to use this scenario.to use this scenario.
The below screenshot shows the documents repository
with the activated scenario repository service. In this
example it is called HowToGuideDemo.
Save the settings.
Remark:Remark:Remark:Remark: Restart the portal after changingRestart the portal after changingRestart the portal after changingRestart the portal after changing thethethethe
rrrrepositoryepositoryepositoryepository sssservices.ervices.ervices.ervices.
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
10/17
2. As a system manager, navigate to SystemAdministrationSystem Configuration
Knowledge ManagementContent
ManagementUser Interface
Commands
You must create the scenario command before it can
be used in the layout set. In the list of commands,
choose Newand enter the following values for the
parameters.
Save the settings by choosing OK.
3. As a system manager, navigate to SystemAdministrationSystem ConfigurationKnowledge ManagementContent
ManagementUser InterfaceLayout
Sets
The configuration of the UI command that is used toactivate or deactivate the scenario on a folder is
described below.
In this guide, the standard AdminExplorer layout set
and the corresponding command group are used. This
layout set is available on all portal systems and allows
you to verify the steps in your system.
Select the AdminExplorer, choose
AdminResourceRenderer and then
FolderResourceGroup
AdminResourceCommandGroup. You can also select
the command group directly by navigating to User
InterfaceCommands. However, using the above
procedure makes the relationship between the UI
components clearer.
The above screenshot shows the relationship in the
breadcrumb. Choose Editto add the scenario
command.
Add the alias of the command, here
SingleFolderMultipleAuthorsScenarioCommand, e.g.
at the end of the Command List parameter.
The location of the command corresponds to the
location in the hover menu.In the below screenshot, the command is added to the
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
11/17
end of list of existing commands.
5.45.45.45.4 UsUsUsUsagagagageeee of theof theof theof the SSSScenariocenariocenariocenario
This chapter explains the usage of the scenario. For example, role com.demo.authorrole is used.Portal users author01 and author02 are assigned to this role. The user administrator is folder
administrator.
The basic configuration of the scenario was defined in the previous chapter. Now its usage is
shown.
1. As a content managercontent managercontent managercontent manager, navigate toContent AdministrationKM Content
Navigate to the folder containing the scenario to be
activated. The previous chapter explained the
configuration of the scenario command for the
AdminExplorer layout set.
In the above screenshot, the scenario for the folder
/documents/Public
Documents/HowToGuideDemoFolder is activated.Confirm the next dialog.
Assign the author role and the folder administrator
permission ownership.
The next screenshots show the configuration settings.
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
12/17
With the permission owner setting, full control is
automatically set, as shown in the below screenshot.
The scenario is now activated.
You can deactivate the scenario at any time by
selecting Disable Scenarioas shown in the below
screenshot.
In the standard, no entries to the ACL are set during
the creation process and the scenario is disabled.
You can enable or disable the scenario as often as
required.
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
13/17
2. As user author01author01author01author01,,,, navigate to the folder/documents/Public
Documents/HowToGuideDemoFolder
Create a simple text file in the folder using the online
editing functionality of KM. Navigate to the folder,
choose and select NewText File...
Enter a text as shown in the above screenshot and save
it.
Check the permissions of the document as user
author01.
In the above screenshot you see that the author role
has only read permission. User author01 has full
control and is the permission owner, as indicated by
the grayed out font.
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
14/17
User author01 is the permission owner as well as the
folder administrator.
3. Log on as author02author02author02author02 and navigate to thefolder /documents/PublicDocuments/HowToGuideDemoFolder
Like user author01, user author02 may also create
documents. He or she may also read all files in andbelow the folder.
This is illustrated by the above screenshot, which
shows the permissions of the document, created by
user author01 in step 2.
Note the grayed out fields in the Permissions column.
User author02 is not allowed to change the permissions
since he is not permission owner.
4. Log on as folderfolderfolderfolder adminadminadminadministratoristratoristratoristrator andnavigate to the folder /documents/Public
Documents/HowToGuideDemoFolder
The folder administrator has the authorization to
change every document.
The above screenshot shows the permissions of the
folder administrator. If, for example, user author02 is
on vacation and user author01 wants to edit thedocument, the folder administrator can change the
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
15/17
authorizations by giving user author01 full control.
The above screenshot shows the manually added ACL
entries for user author01.
6666 ExtendingExtendingExtendingExtending thethethethe SSSScenariocenariocenariocenario
The scenario as defined in this guide might not meet the requirements of your business case.
Additional functionality might be necessary in order to solve your needs. This chapter describes
some ideas that could be implemented by the community.
Language-dependent textsOne major requirement from your business case might be to offer language-depended
text, for example for the UI command. Of course, this can be done using resource
bundle files, a standard Java technology. However, some parts need to be implemented
for use in the implementation. Documentation is available on the Help Portal and onSDN.
Folder-specific author role and folder adminIn larger companies, separate groups of authors might need to be taken into
consideration. It must therefore be possible to assign author roles for individual folders.
Different ACL entries for owners and/or authorsIn some cases you might need to assign owners read/write permission only after creating
the document .
Document cleansingIn order to avoid a continuously growing number of documents, you are recommendedto introduce a cleansing activity, for example by implementing specific reports which
delete documents that are no longer valid.
The attachment to this guide includes the corresponding NetWeaver Developer Studio project.
In order to use it, extract the archive in your Java workspace and import the project.
After adding the Java KM libraries, you can use the project as a starting point for your
enhancements.
The coding only uses released APIs. Details are available on SDN, for example in the Knowledge
Management forum. You can also find the Javadoc on the SDN and further KM coding in the
KM Code Samples area.
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
16/17
7777 Removing theRemoving theRemoving theRemoving the SSSScenariocenariocenariocenario
The previous chapters describe the steps required to implement the scenario. In order to remove
the implementation, perform all steps in the reverse order.
The steps are described below:1. Remove the scenario command from any FlexUI component (see chapter 5.3).2. Remove the repository service from any repository manager (see chapter 5.3).3. Delete the scenario service from the ConfigUI of the repository services (see chapter 5.3).4. Remove the portal archive using the Portal Archive Remover (see chapter 5.2) as shown
below.
5. If necessary, change the permission settings of the folders in which the scenario wasused.
8888 Change LogChange LogChange LogChange Log
DateDateDateDate ReleaseReleaseReleaseRelease DescriptionDescriptionDescriptionDescription
January 2006January 2006January 2006January 2006 1.0 First release of the HowTo Guide
-
8/12/2019 How to Implement a Single Folder - Multiple Authors Scenario (NW2004).Zip
17/17
www.sdn.sap.com/irj/sdn/howtoguides