|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.governance.api.schema.SchemaManager
public class SchemaManager
This provides the management functionality for schema artifacts stored on the registry.
Constructor Summary | |
---|---|
SchemaManager(org.wso2.carbon.registry.core.Registry registry)
Constructor accepting an instance of the registry to use. |
Method Summary | |
---|---|
void |
addSchema(Schema schema)
Adds the given schema artifact to the registry. |
Schema[] |
findSchemas(SchemaFilter criteria)
Finds all schema artifacts matching the given filter criteria. |
Schema[] |
getAllSchemas()
Finds all schema artifacts on the registry. |
Schema |
getSchema(String schemaId)
Fetches the given schema artifact on the registry. |
Schema |
newSchema(byte[] content)
Create a new Schema based on content either embedded or passed to a service. |
Schema |
newSchema(byte[] content,
String name)
Create a new Schema based on content either embedded or passed to a service. |
Schema |
newSchema(String url)
Creates a new schema artifact from the given URL. |
void |
removeSchema(String schemaId)
Removes the given schema artifact from the registry. |
protected void |
setContent(Schema schema,
org.wso2.carbon.registry.core.Resource schemaResource)
Sets content of the given schema artifact to the given resource on the registry. |
void |
updateSchema(Schema schema)
Updates the given schema artifact on the registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SchemaManager(org.wso2.carbon.registry.core.Registry registry)
registry
- the instance of the registry.Method Detail |
---|
public Schema newSchema(String url) throws GovernanceException
url
- the given URL.
GovernanceException
- if the operation failed.public Schema newSchema(byte[] content) throws org.wso2.carbon.registry.core.exceptions.RegistryException
content
- the schema content
GovernanceException
- if the operation failed.
org.wso2.carbon.registry.core.exceptions.RegistryException
public Schema newSchema(byte[] content, String name) throws org.wso2.carbon.registry.core.exceptions.RegistryException
content
- the schema contentname
- the schema name
GovernanceException
- if the operation failed.
org.wso2.carbon.registry.core.exceptions.RegistryException
public void addSchema(Schema schema) throws GovernanceException
schema
- the schema artifact.
GovernanceException
- if the operation failed.public void updateSchema(Schema schema) throws GovernanceException
schema
- the schema artifact.
GovernanceException
- if the operation failed.public Schema getSchema(String schemaId) throws GovernanceException
schemaId
- the identifier of the schema artifact.
GovernanceException
- if the operation failed.public void removeSchema(String schemaId) throws GovernanceException
schemaId
- the identifier of the schema artifact.
GovernanceException
- if the operation failed.protected void setContent(Schema schema, org.wso2.carbon.registry.core.Resource schemaResource) throws GovernanceException
schema
- the schema artifact.schemaResource
- the content resource.
GovernanceException
- if the operation failed.public Schema[] findSchemas(SchemaFilter criteria) throws GovernanceException
criteria
- the filter criteria to be matched.
GovernanceException
- if the operation failed.public Schema[] getAllSchemas() throws GovernanceException
GovernanceException
- if the operation failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |