Introducti​on to Object-Ori​ented Programmin​g in LabVIEW - Article Series
I just posted my second EXPRESSIONFLOW blog article in the series of Introduction to Object-Oriented Programming in LabVIEW. The articles topic is Code Reuse with Interface Design and Composition. Take a look by following this link. Also read the previous article Introcution to Objects and Classes at the same location. If you want to avoid missing the forthcoming articles, please subscribe to the RSS feed.
I'll
post a link to forthcoming articles in the series to this tread. If you
want to dicuss the articles, please open a new discussion topic for specific
articles or discuss at expressionflow.com. This way we can keep this
thread as a list of articles in the series.
Tomi
Tomi Maila
I'm very excited to introduce a third article in my article series Introdunction to Object-Oriented Programming in LabVIEW. Today's topic is
Inheritance and Class Hierachies in Object-Oriented Programming
Don't miss other articles in this article series or other LabVIEW related articles at EXPRESSIONFLOW. You can also subscribe to the RSS feed of all articles at EXPRESSIONFLOW so you won't miss the next one.
Tomi
Tomi Maila
Similar Messages
-
Brief Introduction of Business objects
I am looking for an overview powerpoint about the brief introduction of Business objects, connection with BI, roadmap...
Does anyone know the link to those information? Thanks.Hi,
Please refer the below PPT link...
https://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/10abbfac-f598-2b10-8d89-842fb1a09905&overridelayout=true
Hope this might help you..
Regards
Sindhu -
Hello,
I am a relative beginner to Java Sound, so I appologise for the inanity of the question.
I have a WAV file I want to manipulate, and am wanting to use a Mixer object to do so. Various tutorials I have looked at talk of InputStreams from devices, and have seen no talk of input from a file. Is this possible? if so, I would be grateful for a link to relavent tutorials, or for example code.
The alternative to this is to use DSP, but as this is far more complicated, I would like to explore Mixer avenues first.
Many thanks,
FionaFillis52 wrote:
Now that the code is properly formatted, are people willing to help?No one here gets paid to help you... so let's lose the attitude, ok? If someone trying to help you
I know that most people use mixers to input data then send it directly to the speakers, but any help in inputting data to the mixer without sending it to the speakers would be really helpfulIt depends on the mixer you're using, honestly...
http://www.vsj.co.uk/java/display.asp?id=370
The first thing to note is, if you have a SourceDataLine and a TargetDataLine from the same mixer object...whatever is written to (the set of) SourceDataLine will be mixed and sent to the TargetDataLine... JavaSound should always have at least one software mixer than will allow you to mix without rendering the sound...
So, for instance, you could write a program that mixes audio files using JavaSound
http://www.jsresources.org/examples/AudioConcat.html
Anyway, the second thing to keep in mind is that you can always just grab the Speaker port and turn it off...
Port.Info recPortInfo = new Port.Info(Port.class, "SPEAKER", true);
Port recPort = (Port)AudioSystem.getLine(recPortInfo);
recPort.open();
Control [] controls = recPort.getControls();
for(int i=0; i<controls.length; i++) {
if(controls[i] instanceof CompoundControl) {
Control[] members =((CompoundControl)controls).getMemberControls();
for(int j=0; j<members.length; j++) {
if(members[j].getType().toString().equals(“Select”)) {
((BooleanControl)members[j]).setValue(false);
else {
if(controls[i].getType().toString().equals(“Select”)) {
((BooleanControl)controls[i]).setValue(false);
recPort.close(); -
Hi,
I am doing my final year project on wireless data acquisition & building
automation. Simply just a computer which can control building equipments &
receive the status.
I want my program to be flexible so that when there are new equipments
added to the building, the user can add those equipments control in the
computer side software. (I expect the user don't know how to user labview
for programming). For example, if a water pump is added in the building, the
user can just add a new control for that water pump by just click on a few
buttons and set the equipments address.
Any suggestion??
Best regards
CalvinHi Calvin
The only way I know of generating controls/indicators like that is using an
array of controls (or an array of clusters, each clusterr containing a set of
controls), and dynamically changing the number of elements in the array. You
can then set some of the attribute node properties such as the index that is
visible at the top left of the array control, and the number of rows/columns
that are visible. However, it means that each new control set you create has
to be the same as all the others (because it is an array).
Paul
Research Assistant
School of Physiotherapy, Curtin University of Technology
Selby Street, Shenton Park, Western Australia, Australia. 6008
email: [email protected]
Tel. +61 8 9266 4657 Fax. +61 8 9266 3699
"Everyone who c
alls on the name of the Lord will be saved." Romans 10:12
"For all have sinned and fall short of the glory of God, and are justified
freely by his grace through the redemption that came by Christ Jesus." Romans
3:23-4
Calvin wrote:
> Hi,
> I am doing my final year project on wireless data acquisition & building
> automation. Simply just a computer which can control building equipments &
> receive the status.
>
> I want my program to be flexible so that when there are new equipments
> added to the building, the user can add those equipments control in the
> computer side software. (I expect the user don't know how to user labview
> for programming). For example, if a water pump is added in the building, the
> user can just add a new control for that water pump by just click on a few
> buttons and set the equipments address.
>
> Any suggestion??
>
> Best regards
> Calvin -
"Top level objects not released" warning when accessing LabVIEW adapter through API
I'm having a problem when using the TestStand API in LabVIEW: I'm trying to get the VI path for a TestStand test step, but I'm getting the "Top level objects not released properly" warning. It doesn't look like I'm forgetting to close something, but obviously I am. Snippet is below, and warning text follows. Anyone have any ideas?
I'm using LabVIEW 2010 and TestStand 2010.
This forum has been a huge help. Thanks to everyone!
-Joe
References to PropertyObjects were not released properly. Total number of objects: 418 Number of top-level objects: 7
Note: Some top-level objects may be included if they are referenced by an incorrectly released top-level object. For example, an unreleased SequenceContext object references a SequenceFile object.
The following top-level objects were not released:
Type Definitions [6 object(s) not released] Type Definition #1: Name: FlexGStepAdditions
Type Definition #2: Name: VIParameter
Type Definition #3: Name: VIParameterElement
Type Definition #4: Name: NI_LabVIEWParameterResult
Type Definition #5: Name: Expression
Type Definition #6: Name: Path
And the following uncategoried objects: LabVIEWModule (FlexGStepAdditions) Name: SData
Solved!
Go to Solution.Yep, that worked. I thought that Variant To Data was just converting the module reference to the LabVIEWModule data type, but apparently I was wrong... This TS leak checker is sure making me learn about how to properly close references... I've been programming memory leaks for years!
I was also having problems with LabVIEW crashing after the VI ran, and fixing the order of the close references fixed that, too.
Working code is below.
Thanks a lot (again) Doug.
-Joe -
ActiveX can't create object when VB Script called from Labview
I have an interesting issue that I can't find a solution for. I am using the DIAdem Run Script.VI in Labview to call a script that opens an Outlook object and sends an email. When the script is called via LabView I get this error:
However, when I manually run the script from the DIAdem script tab it works as expected with no errors.
This is the code:
'Begin email send function
Dim oOutlookApp
Dim oOutlookMail
Dim cnByValue : cnByValue = 1
Dim cnMailItem : cnMailItem = 0
' Get Outlook Application Object
Set oOutlookApp = CreateObject("Outlook.Application")
' Create Mail Item
Set oOutlookMail = oOutlookApp.CreateItem(cnMailItem)
' Set Mail Values
With oOutlookMail
.To = "[email protected]"
.Subject = "Report: " & Data.Root.ActiveChannelGroup.Name & " for " & CurrDate
.Body = "test automatic report emailing with VB Script."
' Add Attachement
Call .Attachments.Add(strLocFileName, cnByValue, 1 )
' Send Mail
Call .Send()
End With
(Original code includes Option Explicit and all variables are properly included/declared, I just took the snippet of what's causing the error).
I have looked at the following threads for info already:
http://forums.ni.com/t5/DIAdem/Some-errors-when-calling-LabVIEW-VIs-Interactively-from-DIAdem/td-p/2...
http://forums.ni.com/t5/DIAdem/Active-X-component-cannot-create-object-Diadem-8-1/m-p/71212/highligh...
-I tried running the script via Windows explorer (per Brad's suggestion) by itself without the DIAdem specific functions and it runs fine.
http://forums.ni.com/t5/DIAdem/Error-while-runing-diadem-asynchronous-script-from-labview-on/m-p/111...
-I am not running the scripts asynchronously
Using Windows 7 (64bit), DIAdem 11.2 and LabView 7.1.1
Thank you.Hey techerdone -
I'm afraid I personally can't be of much help - I tested your code both from DIAdem and from LabVIEW and each worked without issues in both cases (Outlook closed, Outlook open). I'm using DIAdem 2011 SP1, LabVIEW 2011, and Outlook 2007...
Derrick S.
Product Manager
NI DIAdem
National Instruments -
Objects in MSO refuse to link to articles
Hi there,
I realize this is a pretty insignificant problem compared to the complexity I'm reading about here in this forum - but I'm new to this...and really could use some help.
This was not a problem with the other app I built - but I have not been having success this time around. I have a slideshow of 8 images, and want to enable a jump to related ariticles when the images are tapped. The first image behaves correctly but the other 7 do not link at all. I tried making the images themselves buttons and created hyperlinks using 'navto' to point to the articles. This did not work for any except the first image. I also attempted to add hotspots to the individual images with invisible text frames converted to buttons, but the information applied to any one button populates all the other text frames/buttons. Any ideas? I'm sure it's some small thing I'm missing - but I'm stumped.
ThanksThis issue with the MSO is really weird. It has worked for me before, although I think perhaps I had behginner's luck. I think the parent-child link might have something to do with it but have no idea how to unlink "it". In addition, is there any way to clean out unused hyperlinks etc. that are cluttering things up. I am about to give up and just recreate this thing as I've tried every possible combination of button, hyperlink etc. (which is probably a good reason why everything at the moment is totally bunged up). The rest of my work looks great - it's just this one article. So very very annoying....
-
Business Object BUS1065 using PA30
Dear Experts,
As per my requirement, I am using business object BUS1065 in PA30 for creating attachment and stored document until here it is working fine but the business object is not taking the info type value which is I entered in PA30 transaction. I am found this problem in OAAD transaction where I am testing the attachment file .
Please assist me on this issue, If any one have idea about the issue.
I had tried to find in SAP FORUM, but I could not get like this issue.
Appreciate your response.
Thank you.
Regards,
Prasad.Hi Robert,
The DI API documentation about the UserPermission + UserPermissionTree object mentions that:
It mentions it in the introduction to this object - and essentially in the <b>Remarks</b> it even points you to the menu.
Regards,
Frank -
Business Object UserPermission using Table USR3
Hi,
Does anybody know where in the SAP B1 functionality the table USR3 (for Business Object UserPermission) and/or table OUPT (for Business Object UserPermissionTree) get populated?
Thanks in advance.Hi Robert,
The DI API documentation about the UserPermission + UserPermissionTree object mentions that:
It mentions it in the introduction to this object - and essentially in the <b>Remarks</b> it even points you to the menu.
Regards,
Frank -
What are the features of Business object.
Hi Experts,
Can any please give me brief idea about Business object which one will going implent into BI . and what are the features of Business object.
i will assign points if it is helpfull.
Regards
venu.Hi,
Bussiness Object is the reporting tool of datawarehouse.BI is itself a data ware house.The next generation SAP BI will be using BO as reporting tool instead of BeX.BO is a Reporting tool. Presently we are using BI BEX tool for reporting. slowly BI BEX tool is replacing by BO.Use Netveawer and SAP BW for the Backend and Master data management or Use Data Integartor. For Front End Use BEX tools for QR$A or use the BO Suite.BO has many advantages over BEX tool like using BO we can creat crystal reports ets.
Pls chk this links for detailed information abt Business Object:
/people/ingo.hilgefort/blog/2008/02/07/businessobjects-and-sap-part-i
/people/kuhan.milroy/blog/2008/03/11/introduction-to-business-objects-suite-of-technologies
/people/ingo.hilgefort/blog/2008/02/19/businessobjects-and-sap-part-2
/people/ingo.hilgefort/blog/2008/02/07/businessobjects-and-sap-part-i
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90d7cbf0-84c2-2a10-dabd-93d5f0db5f4b
Hope this helps,
Regards
CSM Reddy -
Regarding Object oreinted concepts
hello all,
do any one have basic learning material related to Object oreinted concepts in ABAP.
plz do forward it to me at [email protected]
thanks for ur help..
if its useful i'll rewards points.Hi
Here are few links
http://www.erpgenie.com/abap/OO/defn.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
Hi
go through the following limks...
http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
Classes
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
Object Handling
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5f54f411d194a60000e8353423/content.htm
Declaring and Calling methods
http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
Inheritance.
http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
Interfaces.
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
Trigerring and handling Events
http://help.sap.com/saphelp_47x200/helpdata/en/71/a8a77955bc11d194aa0000e8353423/content.htm
What is Object Orientation?
In the past, information systems used to be defined primarily by their functionality: data and functions were kept separate and linked together by means of input and output relations.
The object-oriented approach, however, focuses on objects that represent abstract or concrete things of the real world. These objects are first defined by their character and their properties which are represented by their internal structure and their attributes (data). The behaviour of these objects is described by methods (functionality).
Objects form a capsule which combines the character to the respective behaviour. Objects should enable programmers to map a real problem and its proposed software solution on a one-to-one basis.
Typical objects in a business environment are, for example, Customer, Order, or Invoice. From Release 3.1 onwards, the Business Object Repository (BOR) of SAP Web Applicaton Server ABAP has contained examples of such objects. The BOR object model will be integrated into ABAP Objects in the next Release by migrating the BOR object types to the ABAP class library.
A comprehensive introduction to object orientation as a whole would go far beyond the limits of this introduction to ABAP Objects. This documentation introduces a selection of terms that are used universally in object orientation and also occur in ABAP Objects. In subsequent sections, it goes on to discuss in more detail how these terms are used in ABAP Objects. The end of this section contains a list of further reading, with a selection of titles about object orientation.
Objects
Objects are instances of classes. They contain data and provides services. The data forms the attributes of the object. The services are known as methods (also known as operations or functions). Typically, methods operate on private data (the attributes, or state of the object), which is only visible to the methods of the object. Thus the attributes of an object cannot be changed directly by the user, but only by the methods of the object. This guarantees the internal consistency of the object.
Classes
Classes describe objects. From a technical point of view, objects are runtime instances of a class. In theory, you can create any number of objects based on a single class. Each instance (object) of a class has a unique identity and its own set of values for its attributes.
Object References
In a program, you identify and address objects using unique object references. Object references allow you to access the attributes and methods of an object.
In object-oriented programming, objects usually have the following properties:
Encapsulation
Objects restrict the visibility of their resources (attributes and methods) to other users. Every object has an interface, which determines how other objects can interact with it. The implementation of the object is encapsulated, that is, invisible outside the object itself.
Inheritance
You can use an existing class to derive a new class. Derived classes inherit the data and methods of the superclass. However, they can overwrite existing methods, and also add new ones.
Polymorphism
Identical (identically-named) methods behave differently in different classes. In ABAP Objects, polymorphism is implemented by redefining methods during inheritance and by using constructs called interfaces.
Uses of Object Orientation
Below are some of the advantages of object-oriented programming:
· Complex software systems become easier to understand, since object-oriented structuring provides a closer representation of reality than other programming techniques.
· In a well-designed object-oriented system, it should be possible to implement changes at class level, without having to make alterations at other points in the system. This reduces the overall amount of maintenance required.
· Through polymorphism and inheritance, object-oriented programming allows you to reuse individual components.
· In an object-oriented system, the amount of work involved in revising and maintaining the system is reduced, since many problems can be detected and corrected in the design phase.
Achieving these goals requires:
· Object-oriented programming languages
Object-oriented programming techniques do not necessarily depend on object-oriented programming languages. However, the efficiency of object-oriented programming depends directly on how object-oriented language techniques are implemented in the system kernel.
· Object-oriented tools
Object-oriented tools allow you to create object-oriented programs in object-oriented languages. They allow you to model and store development objects and the relationships between them.
· Object-oriented modeling
The object-orientation modeling of a software system is the most important, most time-consuming, and most difficult requirement for attaining the above goals. Object-oriented design involves more than just object-oriented programming, and provides logical advantages that are independent of the actual implementation.
This section of the ABAP Users Guide provides an overview of the object-oriented extension of the ABAP language. We have used simple examples to demonstrate how to use the new features. However, these are not intended to be a model for object-oriented design. More detailed information about each of the ABAP Objects statements is contained in the keyword documentation in the ABAP Editor. For a comprehensive introduction to object-oriented software development, you should read one or more of the titles listed below.
ABAP supports a hybrid programming model. You can use an object-oriented ("OO") programming model based on classes and interfaces, and you can use the more classic procedural and event-driven programming model based on function modules, subroutines, dialog modules, and event blocks. Both models can be used in parallel. You can use classes inside classic processing blocks or you can call classic procedures from methods. In ABAP Objects, SAP has implemented a cleanup of the ABAP language. Within the scope of this language cleanup, stricter syntax checks are performed in classes that restrict the usage of obsolete language elements.
Object orientation in ABAP is an extension of the ABAP language that makes available the advantages of object-oriented programming, such as encapsulation, interfaces, and inheritance. This helps to simplify applications and make them more controllable.
ABAP Objects is fully compatible with the existing language, so you can use existing statements and modularization units in programs that use ABAP Objects, and can also use ABAP Objects in existing ABAP programs.
Check these links
/people/thomas.jung3/blog/2005/09/08/oo-abap-dynpro-programming
/people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
This is good for beginners
/people/sap.user72/blog/2005/05/10/a-small-tip-for-the-beginners-in-oo-abap
Reward all helpfull answers -
Business Object document.
Hi all
I am new in business object so anyone pls send some basic document on BO so i can understand the concept of BO
i will assign points for helpful documents.Hi Ganesh,
Bussiness Object is the reporting toll of data warw house
BI is itself a data ware house.
the next generation SAP BI will be using BO as reporting tool instead of BeX.
BO is a Reporting tool. Presently we are using BI BEX tool for reporting. slowly BI BEX tool is replacing by BO.
Use Netveawer and SAP BW for the Backend and Master data management or Use Data Integartor. For Front End Use BEX tools for QR$A or use the BO Suite.
BO has many advantages over BEX tool like using BO we can creat crystal reports ets.
For More Information check the following link
/people/kuhan.milroy/blog/2008/03/11/introduction-to-business-objects-suite-of-technologies
/people/ingo.hilgefort/blog/2008/02/19/businessobjects-and-sap-part-2
/people/ingo.hilgefort/blog/2008/02/07/businessobjects-and-sap-part-i
Hope it helps u.
Assign points if it helps
Thanks & Regards
santosh -
Career:Shift from ABAP to BW-Netweaver after business object takeover
Hi all,
Am an ABAPer with one and half years of experience.I will be thankful if sombody will tell me If its appropriate to move into BW-Netweaver as i heard BUSINESS OBJECT is likely to replace BW-Netweaver in near future.
Thanks.
Edited by: sandeep pande on May 12, 2008 7:18 PM
Edited by: sandeep pande on May 12, 2008 7:32 PMDear sandeep pande ,
BO was brought up by SAP and It will soon be included in SAP BI in next recent versions.SO its better to join BI. as it has more scope these days/
YOu should know the advantages of BI over BO
BO is the reporting toll of data warw house
BI is itself a data ware house.
the next generation SAP BI will be using BO as reporting tool instead of BeX.
BO is the reporting toll of data warw house.
on the front end it has CrystalReports.
this suit will be used in SAP as front end for EIM.
the latest version of BO is BO 11. 3.
BI is itself a data ware house.
the next generation SAP BI will be using BO as reporting tool instead of BeX.
For More Information check the following link
/people/kuhan.milroy/blog/2008/03/11/introduction-to-business-objects-suite-of-technologies
/people/ingo.hilgefort/blog/2008/02/19/businessobjects-and-sap-part-2
/people/ingo.hilgefort/blog/2008/02/07/businessobjects-and-sap-part-i
http://sap.blogs.techtarget.com/category/teched/
For knowing Overview of BI and go through BI certification follow these
If you are going to Start BI 7.0 courses
you could follow the books
TBW10 Datawarehousing concepts
TBW20 Reporting
TBW42 Adavnced Data warehousing concepts (authorization,Broadcasting,etc)
TBW45 Integrated Palnning
Online courses on APD,XI
Tamong these,TBW10 and TBW20 will be sufficient for you to start and know basic concepts
Overview of BI
http://www.sap.com/platform/netweaver/components/bi/index.epx
For more information please
refer these links
http://www.psimedia.ws
http://www.sap.com/uk/services/education/courses/bw.epx
http://www50.sap.com/useducation/curriculum/print.asp?jc=1&rid=285
http://www50.sap.com/useducation/curriculum/print.asp?jc=1&rid=458
http://www50.sap.com/useducation/certification/examcontent.asp
http://www50.sap.com/useducation/certification/curriculum.asp?rid=506&vid=5
http://www50.sap.com/useducation/certification/curriculum.asp?rid=420
http://csc-studentweb.lrc.edu/swp/Berg/BB_index_main.htm
Hope it helps,
Regards
Bala -
This is an issue I have encountered in CS6 & CC since I've been using a slightly different workflow on a few projects.
I create a smart object, say a coposite of a landscape with a road in it. I add a Radial Blur (zoom) to and move the origina point, file looks great and is adjustable as a smart filter.
Problem occures, if I use Radial Blur (zoom) on another image and change the settings and vanishing point. - When I return back to the image with the blur as a smart filter, the zoom origin point has reverted back to be centred.
If anyone has a workaround for this, please let me know.
On the subject of Radial Blur (zoom) a feature I would like is to be able to set the origin point of the zoom to be outside the canvas area.Sorry. No answer for you, but I certainly sympathise. The inability to preview the focal point for radial Blur > Zoom is one of the great Photoshop mysteries IMO. Maybe the team thought that the introduction of Smart Objects in CS2 was the answer, but it still annoys me that I have to resort to trial and error. Something else that I can’t work out, is why the Alt (Opt) key while in the Zoom Blur panel, changes Cancel to reset, as with other panels, but clicking on Rest only takes the focus back the position it was in when the panel was opened. This seems pointless to me as you have no idea of the effect of any move without committing it — at which point that position becomes the new default.
Is there a way to preview the focus point? If not, can we add that to the wish list? -
Searching objects with permissions
Hi,
I have an interesting problem, which will probably be more complicated to explain than it actually is.
Basically, we have a client that needs to have some business processes implemented. Each user belongs to at least one group, sometimes two or three. Each group has a folder, and the users work on documents in those folders. When they login, they need to see a notification of any documents in some of those folders. This notification is what I'm trying to do at the moment.
What I was attempting to do is apply an ACL to each folder which they need to be notified about. I've created an extended permission 'Notify', and a permission bundle. This way, users / groups in an ACL can have the permission 'Notify' (as not all users / groups on that ACL will want to be notified).
So, in order to display a list of the notifications, what I need to do is run a search like this:
"Give me a list of all ACLs of which the user is an ACE (either as a user or within a group) and the PermissionBundle 'Notify' has been granted"
Unfortunately I can't seem to find a way of doing this in CM SDK. There doesn't seem to be a way of searching for any ACL of which the current user is a direct or indirect member!
Does anyone have any ideas?
Thanks,
PhillThe first thing you need to do is have a mechanism to isolate what are business process documents.
It could be that all business process documents live under base Folder XXX.
Or it could be that all business process documents have an instance of the BusinessProcess category applied to them.
You could also potentially subclass document and introduce BusinessProcessDocument (but I would stick to categories).
Next, you need to construct a search for all business process documents using the criteria above that identifies them (for example folder restricted search, or search for documents with category x applied etc).
Note that the standard ACLs stored on the Business Process documents will determine whom can discover the document.
Additionally, as you have introduced your custom permission bit ('Notify') which is also part of the document ACL, you can perform a subsequent restriction on the returned search results to check that the current user has the appropriate AccessLevel (containing the Notify bit!). To do this check, you utilize the PublicObject method "checkEffectiveAccess"
checkEffectiveAccess on PublicObject is simply a convenience method that does the following:
public boolean checkEffectiveAccess(DirectoryObject obj, AccessLevel level) throws IfsException
// if no ACL, assume all access (no ACL == no security)
boolean b = true;
AccessControlList acl = getAcl();
if (acl != null)
// if DU owns the object, oris in admin mode,
// he/she has access
DirectoryObject owner = null;
try
owner = getOwner();
catch(IfsException e)
if(!e.containsErrorCode(10200))
throw e;
if (obj != null && obj.equals(owner))
b = true;
else
b = acl.checkGrantedAccess(obj, level);
return b;
Matt.
Maybe you are looking for
-
I got a Mac mini and in general I'm happy with it but found out that there's some software I use regularly that is just much better on Windows. They barely support OS X although technically they do. So I would like to dual boot Windows as it seems
-
The problem is: I download an pdf file from internet. Filename is containg skandinavian characters which are converted as "%D6 etc." When I try to open the file with N9 I get an error similar to: "file is corrupted, can not open the file". Yet the sa
-
Mac OS X 10.5.8 - 15 minutes to Startup / Boot - error log help?
Found an older thread that advised me to check out Console Messages Error Log, which I did, and I have pasted the notable entries below. 4/22/11 6:57:56 PM com.apple.launc hd[1] (org.ntp.ntpd) Unknown key: SHAuthorizationRight 4/22/11 6:57:56 PM com.
-
Error 205 when intalling application manager
How can I fix error 205 when adobe application manager is updating? I have wasted days trying to get photoshop but application manager tries to update even when I get the latest version manually. Then before it finishes initializing I get error 205 o
-
Reader X Can't Open PDF's Using Firefox or IE
I just installed Adobe Reader X on a computer with Windows XP SP3. It would not run until I put it in Windows 2000 compatibility mode and install the visual C++ 2008 run time package. Now I can open and print PDF's using the freestanding reader pro