|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectischool.info340.teamE.Media
public class Media
Represents media in the storage medium
| Constructor Summary | |
|---|---|
Media(int id,
int creatorId,
int placeId,
java.net.URL location,
java.lang.String descr,
java.util.Date dateCaptured,
MediaManager manager)
Creates a new instance of media |
|
Media(int creatorId,
int placeId,
java.net.URL location,
java.lang.String descr,
java.util.Date dateCaptured,
MediaManager manager)
Creates a new instance of media, and adds it to the storage media |
|
| Method Summary | |
|---|---|
boolean |
exists()
|
int |
getCreatorId()
|
java.util.Date |
getDateCaptured()
|
java.lang.String |
getDescr()
|
int |
getId()
|
MediaManager |
getManager()
|
int |
getPlaceId()
|
java.net.URL |
getURL()
|
boolean |
remove()
Removes this media from the storage medium and marks it as unusable so future use of this media will generate exceptions. |
boolean |
restore()
Inserts this previously removed media back into the storage medium and marks it as usable again. |
boolean |
update(int creatorId,
int placeId,
java.net.URL location,
java.lang.String descr,
java.util.Date dateCaptured)
Updates this media object and its representation in the storage medium to have a new set of properties |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Media(int id,
int creatorId,
int placeId,
java.net.URL location,
java.lang.String descr,
java.util.Date dateCaptured,
MediaManager manager)
id - The unique identifier in the storage medium for this mediacreatorId - The user who created this mediaplaceId - The id of the place to which this media belongslocation - The URL for accessing the mediadescr - The description of this mediadateCaptured - The date on which this media was captured or createdmanager - The manager for the storage medium in which this user exists
public Media(int creatorId,
int placeId,
java.net.URL location,
java.lang.String descr,
java.util.Date dateCaptured,
MediaManager manager)
creatorId - The user who created this mediaplaceId - The id of the place to which this media belongslocation - The URL for accessing the mediadescr - The description of this mediadateCaptured - The date on which this media was captured or createdmanager - The manager for the storage medium in which this place exists| Method Detail |
|---|
public int getId()
public int getCreatorId()
public int getPlaceId()
public java.net.URL getURL()
public java.lang.String getDescr()
public java.util.Date getDateCaptured()
public MediaManager getManager()
public boolean update(int creatorId,
int placeId,
java.net.URL location,
java.lang.String descr,
java.util.Date dateCaptured)
creatorId - The user who created this mediaplaceId - The id of the place to which this media belongslocation - The URL for accessing the mediadescr - The description of this mediadateCaptured - The date on which this media was captured or created
public boolean exists()
public boolean remove()
public boolean restore()
java.lang.IllegalStateException - if this user has not yet been deleted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||