com.stormpath.sdk.impl.resource.DefaultVoidResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stormpath-sdk-impl Show documentation
Show all versions of stormpath-sdk-impl Show documentation
The Stormpath Java SDK core implemenation .jar is used at runtime to support API invocations. This
implementation jar should be a runtime dependency only and should NOT be depended on at compile time by
your code. The implementations within this jar can change at any time without warning - use it with runtime
scope only.
package com.stormpath.sdk.impl.resource;
import com.stormpath.sdk.impl.ds.InternalDataStore;
import com.stormpath.sdk.resource.Saveable;
import com.stormpath.sdk.resource.VoidResource;
import java.util.Map;
public class DefaultVoidResource extends AbstractInstanceResource implements VoidResource {
private static final Map PROPERTY_DESCRIPTORS = createPropertyDescriptorMap();
private String href;
public DefaultVoidResource(InternalDataStore dataStore) {
super(dataStore);
}
public DefaultVoidResource(InternalDataStore dataStore, Map properties) {
super(dataStore, properties);
}
public DefaultVoidResource(InternalDataStore dataStore, Map properties, String href) {
this(dataStore, properties);
this.href = href;
}
@Override
public Map getPropertyDescriptors() {
return PROPERTY_DESCRIPTORS;
}
@Override
public String getHref() {
if (href != null) {
return href;
}
return super.getHref();
}
}