Policy is the interface used by the RepositoryStore for interpreting and applying policy data to CCN repositories. More...
Public Member Functions | |
void | update (PolicyXML pxml, boolean fromNet) throws RepositoryException |
Update the policy. | |
void | updateFromInputStream (InputStream is) throws RepositoryException |
Update the policy from a file This assumes that the update is not "from the network". | |
ArrayList< ContentName > | getNamespace () |
Gets the current namespace covered by this repository. | |
void | setNamespace (ArrayList< ContentName > nameSpace) |
void | setVersion (String version) |
Set the version of the policy protocol which is currently valid. | |
void | setLocalName (String localName) throws MalformedContentNameStringException |
The localName is used to identify an individual repository among several in an organization or other entity. | |
String | getLocalName () |
void | setGlobalPrefix (String globalName) throws MalformedContentNameStringException |
The globalPrefix is used to identify a path to repositories within an organization or entity. | |
ContentName | getGlobalPrefix () |
PolicyXML | getPolicyXML () |
Policy is the interface used by the RepositoryStore for interpreting and applying policy data to CCN repositories.
ContentName org.ccnx.ccn.impl.repo.Policy.getGlobalPrefix | ( | ) |
Implemented in org.ccnx.ccn.impl.repo.BasicPolicy.
String org.ccnx.ccn.impl.repo.Policy.getLocalName | ( | ) |
Implemented in org.ccnx.ccn.impl.repo.BasicPolicy.
ArrayList<ContentName> org.ccnx.ccn.impl.repo.Policy.getNamespace | ( | ) |
Gets the current namespace covered by this repository.
Any name not included within this namespace will not be stored in this repository.
Implemented in org.ccnx.ccn.impl.repo.BasicPolicy.
PolicyXML org.ccnx.ccn.impl.repo.Policy.getPolicyXML | ( | ) |
Implemented in org.ccnx.ccn.impl.repo.BasicPolicy.
void org.ccnx.ccn.impl.repo.Policy.setGlobalPrefix | ( | String | globalName | ) | throws MalformedContentNameStringException |
The globalPrefix is used to identify a path to repositories within an organization or entity.
Several local repositories could be contained with an organizations global repository namespace.
globalName | the prefix as a string in the form xxx/yyy/zzz |
MalformedContentNameStringException | if the name is formatted incorrectly |
Implemented in org.ccnx.ccn.impl.repo.BasicPolicy.
void org.ccnx.ccn.impl.repo.Policy.setLocalName | ( | String | localName | ) | throws MalformedContentNameStringException |
The localName is used to identify an individual repository among several in an organization or other entity.
localName | the name as a string in the form xxx/yyy/zzz |
MalformedContentNameStringException | if the name is formatted incorrectly |
Implemented in org.ccnx.ccn.impl.repo.BasicPolicy.
void org.ccnx.ccn.impl.repo.Policy.setVersion | ( | String | version | ) |
Set the version of the policy protocol which is currently valid.
Depending on the implementation, any policy file containing a protocol with a different version ID may be rejected.
version | the version to use |
Implemented in org.ccnx.ccn.impl.repo.BasicPolicy.
void org.ccnx.ccn.impl.repo.Policy.update | ( | PolicyXML | pxml, | |
boolean | fromNet | |||
) | throws RepositoryException |
Update the policy.
pxml | an XML decoded policy structure | |
fromNet | true if request is from the network as opposed to reading a local file |
XMLStreamException | if the policy data is incorrect or inconsistent | |
IOException | on stream read errors |
Implemented in org.ccnx.ccn.impl.repo.BasicPolicy.
void org.ccnx.ccn.impl.repo.Policy.updateFromInputStream | ( | InputStream | is | ) | throws RepositoryException |
Update the policy from a file This assumes that the update is not "from the network".
is | stream for the file |
Implemented in org.ccnx.ccn.impl.repo.BasicPolicy.