public class View extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
VIEW_PROPERTY_CLUSTER_ID |
protected static String |
VIEW_PROPERTY_CLUSTER_ID_DEFINED_AT |
protected static String |
VIEW_PROPERTY_CLUSTER_ID_DEFINED_BY |
Constructor and Description |
---|
View(org.apache.sling.api.resource.Resource resource) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
org.apache.sling.api.resource.Resource |
getResource()
Returns the underlying resource of this view.
|
String |
getViewId()
Returns the id of this view.
|
int |
hashCode() |
String |
matches(Set<String> view)
Compare this view with the given set of slingIds
|
String |
matchesLiveView(org.apache.sling.api.resource.Resource clusterInstancesRes,
Config config)
Checks whether this view matches the 'live view' as represented in the clusterInstances resource
|
void |
remove(boolean logErrorOnFailure)
Delete this view from the repository
|
protected static final String VIEW_PROPERTY_CLUSTER_ID
protected static final String VIEW_PROPERTY_CLUSTER_ID_DEFINED_AT
protected static final String VIEW_PROPERTY_CLUSTER_ID_DEFINED_BY
public org.apache.sling.api.resource.Resource getResource()
public String getViewId()
public String matchesLiveView(org.apache.sling.api.resource.Resource clusterInstancesRes, Config config) throws Exception
clusterInstancesRes
- the clusterInstances resource against which to checkException
- thrown the view cannot be properly matched
- eg when the ./members resource doesn't exist at all or
a RuntimeException occurspublic String matches(Set<String> view) throws Exception
view
- a set of slingIds against which to compare this viewException
- thrown the view cannot be properly matched
- eg when the ./members resource doesn't exist at all or
a RuntimeException occurspublic void remove(boolean logErrorOnFailure)
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.