Changeset 4435
- Timestamp:
- 02/05/14 09:55:59 (10 years ago)
- Location:
- cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/getSchemaMetadata.dpml
r4367 r4435 133 133 <argument name="operator"> 134 134 <literal type="xml"> 135 <config> 136 <header name="httpResponse:/header/Cache-Control">{$cache-control}</header> 137 <header name="mime">{$schema-mime}</header> 138 <header name="HTTP_CACHE_EXPIRES_DELTA_SECONDS">0</header> 139 </config> 135 <query> 136 <config> 137 <header name="httpResponse:/header/Cache-Control">{$cache-control}</header> 138 <header name="mime">{$schema-mime}</header> 139 <header name="HTTP_CACHE_EXPIRES_DELTA_SECONDS">0</header> 140 </config> 141 </query> 140 142 </literal> 141 143 </argument> -
cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/getUser.dpml
r3951 r4435 26 26 <argument name="operator"> 27 27 <literal type="xml"> 28 <ids> 29 <id>{$userID}</id> 30 </ids> 28 <query> 29 <ids> 30 <id>{$userID}</id> 31 </ids> 32 </query> 31 33 </literal> 32 34 </argument> -
cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/pagedUserSchemas.dpml
r3875 r4435 26 26 <argument name="operator"> 27 27 <literal type="xml"> 28 <ids> 29 <id>{$userID}</id> 30 </ids> 28 <query> 29 <ids> 30 <id>{$userID}</id> 31 </ids> 32 </query> 31 33 </literal> 32 34 </argument> -
cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/postSchemaAccess.dpml
r4370 r4435 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <sequence debug=" true">2 <sequence debug="false"> 3 3 <log> 4 4 <level>INFO</level> … … 24 24 <!-- Obtain IDs authorized to update the schema --> 25 25 <request assignment="authorized-update-IDs"> 26 <identifier>active: xquery</identifier>26 <identifier>active:sloot.xquery</identifier> 27 27 <argument name="operator"> 28 <literal type="string"> 29 <!--Code for active:xquery--> 30 declare variable $authorizedIDs external; 31 element ids { 32 for $id in $authorizedIDs/ids/id 33 return if (contains($id/@actions, 'u')) 34 then $id 35 else () 36 } 37 38 <!-- Code for active:sloot.xquery --> 39 <!--<ids> 40 { 41 for $id in $authorizedIDs/ids/id 28 <literal type="xml"> 29 <query> 30 <ids> 31 { 32 for $id in $authorizedIDs/ids/id 42 33 return if (contains($id/@actions, 'u')) 43 then $id 44 else () 45 } 46 </ids>--> 34 then $id 35 else () 36 } 37 </ids> 38 </query> 47 39 </literal> 48 40 </argument> … … 121 113 <argument name="operator"> 122 114 <literal type="xml"> 123 <ids> 124 { 125 for $user in $postedAuthorizedUsers/* 115 <query> 116 <ids> 117 { 118 for $user in $postedAuthorizedUsers/* 126 119 return if (name($user) eq 'all') 127 then <id actions="{data($user/actions)}">ALL</id> 128 else (<id actions="{data($user/actions)}" 129 role="{data($user/role)}">{string($user/ref)}</id>) 130 } 131 </ids> 120 then <id actions="{data($user/actions)}">ALL</id> 121 else (<id actions="{data($user/actions)}" 122 role="{data($user/role)}">{string($user/ref)}</id>) 123 } 124 </ids> 125 </query> 132 126 </literal> 133 127 </argument> … … 153 147 </else> 154 148 </if> 155 156 157 158 159 160 <!--<request>161 <identifier>active:org.isocat.schemacat.access.data.schema.authorizedIDs</identifier>162 <verb>SINK</verb>163 <argument name="schemaID">arg:schemaID</argument>164 <argument name="authorizedUsers">165 <literal type="xml">166 <ids>167 <id role="owner" actions="rud">u1</id>168 <!-\- <id role="user" actions="ru">u0</id>-\->169 <!-\-<id actions="r">ALL</id>-\->170 </ids>171 </literal>172 </argument>173 </request>-->174 149 </then> 175 150 <else> -
cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/postUser.dpml
r4075 r4435 26 26 <argument name="operator"> 27 27 <literal type="xml"> 28 <ids> 29 <id>{$userID}</id> 30 </ids> 28 <query> 29 <ids> 30 <id>{$userID}</id> 31 </ids> 32 </query> 31 33 </literal> 32 34 </argument> -
cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/schemaAuthorizedIDs.dpml
r4369 r4435 41 41 <argument name="operator"> 42 42 <literal type="xml"> 43 <!--Code for active:xquery--> 44 <!--declare namespace sc = "http://www.isocat.org/ns/schemacat"; 45 declare variable $schemaMetadata external; 46 47 element ids { 48 for $user in $schemaMetadata/sc:schema/sc:access/* 49 return if (name($user) eq 'sc:all' and contains($user/@actions,'r')) 50 then element id { 51 attribute actions{$user/@actions}, 52 'ALL' 53 } 54 else ( element id { 55 attribute actions{$user/@actions}, 56 attribute role{$user/@role}, 57 string($user/@ref) 58 } 59 ) 60 }--> 61 <ids xmlns:sc="http://www.isocat.org/ns/schemacat">{ 43 <query xmlns:sc="http://www.isocat.org/ns/schemacat"> 44 <ids>{ 62 45 for $user in $schemaMetadata/sc:schema/sc:access/* 63 64 65 66 46 return if (name($user) eq 'sc:all' and contains($user/@actions ,'r')) 47 then <id actions="{data($user/@actions)}">ALL</id> 48 else <id actions="{data($user/@actions)}" 49 role="{data($user/@role)}">{string($user/@ref)}</id> 67 50 } 68 51 </ids> 52 </query> 69 53 </literal> 70 54 </argument> -
cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/schemaFile.dpml
r3951 r4435 199 199 <argument name="operator"> 200 200 <literal type="xml"> 201 <config> 202 <header name="httpResponse:/header/Cache-Control">{$cache-control}</header> 203 <header name="mime">{$schema-mime}</header> 204 <header name="httpResponse:/header/Content-Disposition">{$content-disposition}</header> 205 <header name="HTTP_CACHE_EXPIRES_DELTA_SECONDS">0</header> 206 </config> 201 <query> 202 <config> 203 <header name="httpResponse:/header/Cache-Control">{$cache-control}</header> 204 <header name="mime">{$schema-mime}</header> 205 <header name="httpResponse:/header/Content-Disposition">{$content-disposition}</header> 206 <header name="HTTP_CACHE_EXPIRES_DELTA_SECONDS">0</header> 207 </config> 208 </query> 207 209 </literal> 208 210 </argument> -
cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/userSchemas.dpml
r3875 r4435 26 26 <argument name="operator"> 27 27 <literal type="xml"> 28 <ids> 29 <id>{$userID}</id> 30 </ids> 28 <query> 29 <ids> 30 <id>{$userID}</id> 31 </ids> 32 </query> 31 33 </literal> 32 34 </argument>
Note: See TracChangeset
for help on using the changeset viewer.