targetNamespace="http://collectionspace.org/article/"
version="0.1">
- <xs:element name="articleNumber" type="xs:string"/> <!-- An ID for the article (different than the CSID) -->
- <xs:element name="articleContentUrl" type="xs:string"/> <!-- The URL of the article's content -->
- <xs:element name="articleJobId" type="xs:string"/> <!-- The asynch job ID -if any -->
- <xs:element name="articleSource" type="xs:string"/> <!-- The name of the service/resource that was used to create the article. -->
- <xs:element name="articlePublisher" type="xs:string"/> <!-- The user who published the article -->
- <xs:element name="accessExpirationDate" type="xs:dateTime"/> <!-- When the article is no longer available for access -->
- <xs:element name="accessedCount" type="xs:integer"/> <!-- How many times the article has been accessed. -->
- <xs:element name="accessCountLimit" type="xs:integer"/> <!-- The maximum times the article can be accessed. -->
+ <xs:element name="articleNumber" type="xs:string" /> <!-- An ID for the article (different than the CSID) -->
+ <xs:element name="articleContentCsid" type="xs:string" /> <!-- The URL of the article's content -->
+ <xs:element name="articleJobId" type="xs:string" /> <!-- The asynch job ID -if any -->
+ <xs:element name="articleSource" type="xs:string" /> <!-- The name of the service/resource that was used to create the article. -->
+ <xs:element name="articlePublisher" type="xs:string" /> <!-- The user who published the article -->
+ <xs:element name="accessExpirationDate" type="xs:dateTime" /> <!-- When the article is no longer available for access -->
+ <xs:element name="accessedCount" type="xs:integer" /> <!-- How many times the article has been accessed. -->
+ <xs:element name="accessCountLimit" type="xs:integer" /> <!-- The maximum times the article can be accessed. -->
</xs:schema>
<xs:complexType>
<xs:sequence>
<xs:element name="articleNumber" type="xs:string" /> <!-- An ID for the article (different than the CSID) -->
- <xs:element name="articleContentUrl" type="xs:string" /> <!-- The URL of the article's content -->
+ <xs:element name="articleContentCsid" type="xs:string" /> <!-- The URL of the article's content -->
<xs:element name="articleJobId" type="xs:string" /> <!-- The asynch job ID -if any -->
<xs:element name="articleSource" type="xs:string" /> <!-- The name of the service/resource that was used to create the article. -->
<xs:element name="articlePublisher" type="xs:string" /> <!-- The user who published the article -->
public interface ArticlesCommonJAXBSchema {
final static String ARTICLE_NUMBER = "articleNumber";
- final static String ARTICLE_CONTENT_URL = "articleContentUrl";
+ final static String ARTICLE_CONTENT_CSID = "articleContentCsid";
final static String ARTICLE_JOB_ID = "articleJobId";
final static String ARTICLE_SOURCE = "articleSource";
final static String ARTICLE_PUBLISHER = "articlePublisher";
<service:xpath>articleNumber</service:xpath>
</service:ListResultField>
<service:ListResultField>
- <service:element>articleContentUrl</service:element>
- <service:xpath>articleContentUrl</service:xpath>
+ <service:element>articleContentCsid</service:element>
+ <service:xpath>articleContentCsid</service:xpath>
</service:ListResultField>
</service:ListResultsFields>
</service:params>
<service:properties xmlns:service="http://collectionspace.org/services/config/service">
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNameProperty</types:key>
- <types:value>articleContentUrl</types:value>
+ <types:value>articleContentCsid</types:value>
</types:item>
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNumberProperty</types:key>
\r
try {\r
result = getBlobOutput(ctx, repoSession, repositoryId, null, true, outMimeType);\r
- }\r
- \r
- finally {\r
+ if (outMimeType.length() == 0) {\r
+ BlobsCommon blobsCommon = result.getBlobsCommon();\r
+ String mimeType = blobsCommon.getMimeType();\r
+ outMimeType.append(mimeType);\r
+ } \r
+ } finally {\r
if (repoSessionCleanup == true) {\r
releaseRepositorySession(ctx, repositoryClient, repoSession);\r
}\r
import javax.ws.rs.core.UriInfo;
import javax.xml.bind.JAXBElement;
+import org.collectionspace.authentication.spi.AuthNContext;
import org.collectionspace.services.authorization.AccountPermission;
import org.collectionspace.services.jaxb.AbstractCommonList;
import org.collectionspace.services.lifecycle.TransitionDef;
addOutputPart(unQObjectProperties, schema, partMeta);
}
+ MultipartServiceContext ctx = (MultipartServiceContext) getServiceContext();
+
if (supportsHierarchy() == true) {
- MultipartServiceContext ctx = (MultipartServiceContext) getServiceContext();
String showSiblings = ctx.getQueryParams().getFirst(CommonAPI.showSiblings_QP);
if (Tools.isTrue(showSiblings)) {
showSiblings(wrapDoc, ctx);
}
}
- addAccountPermissionsPart();
+ String currentUser = ctx.getUserId();
+ if (currentUser.equalsIgnoreCase(AuthNContext.ANONYMOUS_USER) == false) {
+ addAccountPermissionsPart();
+ }
}
private void addExtraCoreValues(DocumentModel docModel, Map<String, Object> unQObjectProperties)