You can always go ahead and continue extending our project. 2
So earlier we made changes in the data store class. 3
OK. 4
So we changed everything. 5
Today all sectors from the collections framework chapter. 6
So now let's go ahead and continue making changes in the other classes. 7
So lunch not Djala. 8
Here it is. 9
So we have loaded that down. 10
And the next thing that we are doing here is in the stock method. 11
Here it is understocked meant there is going to be for each user it's going to similar browsing OK the 12
bookmarking process. 13
So that's what it is going to do. 14
And Peukert response to the browser and we have this method called us but also we are passing a single 15
user on the set of all bookmarks. 16
Now here is after loading the dot we are fetching the users and also the bookmarks. 17
OK but here are the users still using this. 18
The idea is so we need to change that. 19
So let's make it less of user and make this 20
list awfullest off bookmark. 21
And this data is being fetched using the manager's. 22
OK. 23
So we are using the manager's files. 24
So let's go there. 25
Here it is on managers is in walking the dog layer. 26
Here it is andar is actually in the database. 27
Normally the database calls are made from the Doblin. 28
So let's dig this line in the user dhal and exchange this to this user is being invoked from use on 29
manager Nerdist simply returning the data that it gets from Dow. 30
So change that. 31
And if you're going to launch not Java. 32
So this has also changed. 33
So no more compassionate and this line. 34
Now let's do the same thing. 35
Heard this and here it as bookmarks manager which is in marking bookmarks dhal which is in Woking to 36
get bookmarks method here. 37
So let's just dig this new the same thing again. 38
We did a story this one in the bookmark manager. 39
Also we do the same thing and and launch Also we do the same thing on the compilation and it has gone 40
. 41
Now these are some Brentham that that's it's not really about that for now actually we can change that 42
also does make it less or more. 43
We are done with that and the browse method in view is expecting this. 44
So we can change this to the launch is clear of all completion errors. 45
Now here we are in the view and we are getting the bookmarks and we are iterating through each of the 46
bookmarks here. 47
So that's the first thing here we are simulating a user who is going to bookmark. 48
OK. 49
Bookmarks all of them all of the bookmarks. 50
He's going to bookmark some of them. 51
So we are simulating that. 52
So we just need to change this. 53
OK. 54
So in the foster tradition or it's going to be web links in the second movies under the hood you're 55
just going to be books and he's looking at each of the bookmarks here. 56
OK. 57
So the users are directing is looking at each of the bookmarks here. 58
OK. 59
So this one would be bookmarklet this for loop and this second for loop as for individual bookmarks 60
within that particular type of bookmark. 61
So in the first iteration it would be ramblings. 62
And the second it would be movies and in the third box. 63
Now here we are in the in the previous version we are restricting the user to on the bookmark a certain 64
number of bookmarks. 65
OK. 66
Beyond that he cannot bookmark. 67
So that's some inflexibility I think we can remove got now bookmark bookmark the user can bookmark any 68
number of bookmarks. 69
OK Max limit would be bookmarks Dawk. 70
I mean the maximum number of bookmarks is that the system has. 71
So that is done. 72
So seems like this is also done on we know that the bookmarking decision is made we are randomisation 73
But if we are going to implement the iPod later we will get the decision from the user interface itself 74
. 75
OK. 76
And the same thing is also happening after bookmarking if the user happens to be an editor or the chief 77
editor. 78
The user can actually set the bookmark as kid friendly. 79
OK so this is a code for that if in case you have forgotten you can just go back. 80
You can view that court on Similarly the book here. 81
This court will well will see if the book if the particular bookmark can be shared or. 82
The third party site or not. 83
And all of the decisions here get shared decision and get good the state as a decision. 84
So all the decisions are done via randomisation. 85
Hopefully we will change that also to take the input from the user from the UI or see what we now hear 86
. 87
OK so once the user in the view here once the user is bookmarking an item we are invoking the same user 88
bookmark. 89
So lets go there. 90
Ancel user bookmark is this method is in the book month manager and a Saudi It is an bookmark controller 91
on the control tower. 92
So from the UI from the view part we are invoking the controller. 93
Thats the normal process. 94
Any any web application in and which follows and MVC framework model from the controller we are invoking 95
the same method a set of user book Walk and bookmark manager in the Manager class. 96
So here we are creating this instance called user bookmark which is passed to user and bookmark. 97
So you may recall that we are creating this user bookmark instance and we are saying that it is being 98
bookmarked by this particular user. 99
OK. 100
Its in the user user is the input on that particular user as bookmarking this particular book back. 101
OK so which user is bookmarking which bookmark as something that is stored in this in this instance 102
Hanaford is an instance off of eyeblink than we are doing something we are actually downloading the 103
link and we are writing it here. 104
So. 105
So thats all information so we have and we have implemented quite a bit so far. 106
And here we are in walking does save user a bookmark because we want to save this information to the 107
database so we are working there. 108
So lets go here on this doll as being past the user bookmark. 109
And it is been walking the odd method in the store so lets more there and here it is on this odd method 110
. 111
Ideally it would insert the date time to the database. 112
But since we are managing everything in the date just across are distorting the use bookmark information 113
in this user bookmarks ID. 114
OK. 115
So we are going to change that also because we want only data structures from collections frameworks 116
so lets go here use our bookmarks and its changed list of user bookmark 117
. 118
So that's changed 119
. 120
And we are starting it with that. 121
And we don't need this also anymore. 122
It's here you can just remove that. 123
Keeping track of the index. 124
So thats about it. 125
So let me just your on this here at On-Star Java keynoting data and user are browsing items 126
user 3 user 4 and so on and we are done. 127
So you're done with that. 128
So we have change the program we have extended it now. 129
All ideas are removed and we have replaced them vet who had done with the collections framework data 130
structures. 131
Okay. 132
And we got the benefit off of not having to use fixed size data structures. 133
Okay. 134
During recreation time we had to set the fixed the size of Doddie that's no longer needed. 135
And that did us actors are also automatically extendable. 136
So it's a small change but a nice change. 137
Okay. 138
So we could clearly see the benefit that we how of using data us in the collections framework. 139
Although our aim is very useful. 140
But in this case we could see the flexibility that we could get from collection's free market sectors 141
. 142
Okay. 143
So that's about it. 144
So please go ahead and make this the changes that we have done in this in the previous Nisson. 145
I know with that I think we have also given as much of the project and we will see how we can extend 146
it further later. 147
So thank you and happy coding