|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectro.isdc.wro.model.resource.Resource
public class Resource
Encapsulates information about a resource. This class is not final because we need to mock it in unit tests.
| Constructor Summary | |
|---|---|
Resource()
Empty constructor. |
|
| Method Summary | |
|---|---|
static Resource |
create(String uri)
Creates a resource and set the correct ResourceType based on uri extension. |
static Resource |
create(String uri,
ResourceType type)
Factory method for Resource creation. |
boolean |
equals(Object obj)
|
ResourceType |
getType()
|
String |
getUri()
|
int |
hashCode()
|
boolean |
isMinimize()
|
void |
setMinimize(boolean minimize)
|
void |
setType(ResourceType type)
|
void |
setUri(String uri)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Resource()
| Method Detail |
|---|
public static Resource create(String uri,
ResourceType type)
Resource object.public static Resource create(String uri)
ResourceType based on uri extension. If resourceType cannot be
identified an exception is thrown.
uri - of the resource to create.
public void setType(ResourceType type)
type - the type to setpublic void setUri(String uri)
uri - the uri to setpublic ResourceType getType()
public String getUri()
public boolean isMinimize()
public void setMinimize(boolean minimize)
minimize - the minimize to setpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||