public class AbstractResource extends Object
These class instances are typically created using the
static builder() methods they contain.
The resulting instances are typically immutable,
so where fields can change callers should use a new builder
(or update an underlying data store).
This class is not meant to be instantiated directly, as CAMP only uses defined subclasses (ie containing these fields). It is instantiable for testing.
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractResource.AbstractResourceBuilder |
class |
AbstractResource.Builder<T extends AbstractResource,U extends AbstractResource.Builder<T,U>>
Builder creates the instance up front to avoid repetition of fields in the builder;
but prevents object leakage until build and prevents changes after build,
so effectively immutable.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractResource()
Use
builder() to create |
| Modifier and Type | Method and Description |
|---|---|
static AbstractResource.Builder<? extends AbstractResource,? extends AbstractResource.Builder> |
builder() |
Date |
getCreated() |
Map<String,Object> |
getCustomAttributes() |
String |
getDescription() |
String |
getId() |
String |
getName() |
RepresentationSkew |
getRepresentationSkew() |
String |
getSourceCode() |
List<String> |
getTags() |
String |
getType() |
void |
setCustomAttribute(String key,
Object value) |
String |
toString() |
public static final String CAMP_TYPE
protected AbstractResource()
builder() to createpublic String getId()
public String getName()
public String getType()
public String getDescription()
public String getSourceCode()
public Date getCreated()
public RepresentationSkew getRepresentationSkew()
public static AbstractResource.Builder<? extends AbstractResource,? extends AbstractResource.Builder> builder()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.