Soot analysis for member fields access - soot

i would like to know if soot is able to analysis member field access? For example, if A accessed member fields of B, is soot able to detect this? And determine the name of the class for those members which were accessed in B.

Sure, that's easy. Simple navigate through the JimpleBody and look for appropriate expressions, best using an ExprSwitch. And read the tutorials online!

Related

Getting data type of attributes of Account in Quickbook Online

How can i describe an Quickbook Online object like Account so that i can know what data type each attributes of the Account takes? Using Query or any library that helps to do that. (API Explorer is not a preferable solution for my use case)
The place to get this data is from the .XSD files that Intuit produces. The .XSDs give you information like:
what fields each object has
the lengths of the fields
which fields are required/optional
the types of the fields
etc. etc. etc.
You can get the .XSDs here:
https://developer.intuit.com/app/developer/qbo/docs/learn/explore-the-quickbooks-online-api/minor-versions

How to use class SalesOrganizationLink

I need to retrieve from S4HC the following information: which plants are assigned to a sales organization (in ECC table TVKWZ). Snooping around, I found out the class SalesOrganizationLink which I believe gives me such info. However, I could not instantiate it.
Usually, I get a service class that allows me to retrieve data (i.e., sales order service). I could not find the service class for this case.
Could someone give a hint on how to use this class?
BR,
Pietro
The SalesOrganizationLink class is used by the VDM to represent navigational properties of a SalesOrganization. They hold no information on their own.
If what you are looking for is a navigational property on SalesOrganization you can use the DefaultSalesOrganizationService and expand the naivgational property:
service.getSalesOrganizationByKey("MyKey")
.select(SalesOrganization.TO_MY_NAVIGATION_PROPERTY)
.execute(myDestination);
But I see no property related to "plants" in the SalesOrganization. Please refer to the API Hub for what is available on the services.
I believe the class you're looking for is DefaultSalesOrganizationService.

Class Diagram for Course Registration

I am making a class diagram for Class/Course Registration where students have to first register their course then select their class schedules (timetable)
I am unsure if I can have CourseRegistration and ClassRegistration table like that. The reason why I made it like that is, a student can register for a course but doesnt register to a class directly. so they can wait few days and then only register. So I have to make sure the course registration is saved in the database.
Thank you for all the help
PS: pls don't mind my attributes, they're just a draft.
Your business logic for the registration process (register both for a course and a corresponding class) is too complicated. Normally, one would only register for a class, which would then imply taking the corresponding course.
Also, what does "ClassSchedule" stand for? Is an instance of a "ClassSchedule" a class meeting?
Since your model is supposed to define a design (of database tables and of, e.g., Java classes), each entity class should have an ID attribute defined, which is expressed in UML with the keyword "id" in curly braces appended to the attribute declaration. Having "ID" in the attribute names is not a formal declaration. Also, an ID attribute seems to be missing for ClassSchedule.
Yes, that's fine this way. You could alternatively use the association class notation like this:
Some side notes:
labeling associations is not that helpful except you are on a business level analysis. Rather use role names on either end where appropriate.
Edit I somehow overlooked that you're designing tables. So my previous comment
remove all the id attributes. Each object will have its unique id assigned by the runtime system. Use such an id only if it's of public meaning (e.g. a passport id or a student's registration number). And then use that specific name (e.g. passportId) rather than a <class>id.
goes just for basic class design. If you already have a (derived) table design you can just go with those ids.

Customizing users and roles using identity in asp.net mvc 5

I have sample project for identity customization using
Install-Package Microsoft.AspNet.Identity.Samples -pre
command. But, for this project I have a general ApplicationUser class representing all the users of my application. What if I have different categories of users. For example, I may have Teacher and Student entities and data representing both the entities will be different. How can I customize my application to store data for both the entities having all the features of ApplicationUser?
One way that I think is inheriting both the classes from ApplicationUser and then doing appropriate changes in IdentityConfig.csand defining Controllers for each of them. Is there any other efficient way of doing this?
What if I want to use the built-in authentication and authorization features but using database first workflow?
First, you want to know how to create "types" of users. The way you would do that is exactly how you expected: inherit from ApplicationUser. By default, this will result in a single "users" table with an additional Discriminator column. This column will store the class type that was persisted, i.e. "Teacher", "Student", or "ApplicationUser", and EF will utilize this information to new up the right class for each particular record.
One thing to note with this, though, is that you need to be aware of how UserManager works, namely that it's a generic class (UserManager<TUser>). The default AccountController implementation you have from the sample defines a UserManager property on the controller which is an instance of UserManager<ApplicationUser>. If you use this instance with something like Teacher, it will be upcast to ApplicationUser. In particular if you were to do something like UserManager.Create(teacher), it will actually save an ApplicationUser, instead (the Discriminator column's value will be "ApplicationUser", rather than "Teacher"). If you need to work with the derived user types, you'll need to create separate instances of UserManager<Teacher> and UserManager<Student> for that purpose.
Next, you want to know if you can use a "database first workflow". To answer that, we need to define exactly what that means. EF has what it calls "Database First" which employs EDMX to represent your database entities. This in particular is incompatible with Identity. However, despite the name, what EF calls "Code First", can work with an existing database just as well as create a new one. In other words, yes, you can use an existing database, if you prefer, but no you cannot use "Database First", in the EF-sense. For more information about using an existing database with Code First, see my post.

Can required WCF4 DataMemeber's be organized into required groups?

Is there a way to have required DataMember's within a DataContract to be organized into groups so that you really only require group one or group two but no both to be provided?
I am looking to see if there is functionality similar to Workflow Activity validation where you can flag InArgument's with a RequiredArgument and then use OverloadGroup attribute to put these into groups so that only the arguments in one of the specified groups are required.
It is not possible out of the box with DataContractSerializer but you can switch to XmlSerializer and use xsd:choice (XmlChoiceIdentifierAttribute) but be aware that this will affect your data class beacuse this construct has its own requirements.
Nope, there is no way to do this. Only way to group is to have two different classes and extract away members/properties into those classes, but still...you won't be able to dictate an "either-on" setting.

Resources