001/* 002 * Copyright 2010 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.plugins.explorer.resources; 017 018import java.io.InputStream; 019import java.util.Date; 020 021import org.ametys.core.user.UserIdentity; 022import org.ametys.plugins.repository.RemovableAmetysObject; 023import org.ametys.plugins.repository.dublincore.ModifiableDublinCoreAwareAmetysObject; 024import org.ametys.plugins.repository.lock.LockableAmetysObject; 025import org.ametys.plugins.repository.tag.TaggableAmetysObject; 026 027/** 028 * Interface representing a modifiable resource file of a resources explorer node. 029 */ 030public interface ModifiableResource extends CommentableResource, ModifiableDublinCoreAwareAmetysObject, RemovableAmetysObject, LockableAmetysObject, TaggableAmetysObject 031{ 032 /** 033 * Set binary data. 034 * @param stream The {@link InputStream}. 035 * @param mimeType The file mimetype. 036 * @param lastModified The date of last modification. 037 * @param author The author of last modification. 038 */ 039 public void setData(InputStream stream, String mimeType, Date lastModified, UserIdentity author); 040 041 /** 042 * Set the creator of the resource 043 * @param creator The author 044 */ 045 public void setCreator (UserIdentity creator); 046 047 /** 048 * Set the last contributor of the resource 049 * @param lastContributor The last contributor 050 */ 051 public void setLastContributor(UserIdentity lastContributor); 052 /** 053 * Set the last modified date if this resource. 054 * @param lastModified the last modified date. 055 */ 056 public void setLastModified(Date lastModified); 057 /** 058 * Set the creation date if this resource. 059 * @param creationDate the creation date. 060 */ 061 public void setCreationDate(Date creationDate); 062 063 /** 064 * Set this resource's keywords. 065 * @param keywords the comma-separated keywords. 066 */ 067 public void setKeywords(String keywords); 068 069 /** 070 * Set this resource's keywords. 071 * @param keywords the keywords. 072 */ 073 public void setKeywords(String[] keywords); 074 075 /** 076 * Set this resource mime type. 077 * @param mimeType the mime type. 078 */ 079 public void setMimeType(String mimeType); 080}