Browse Source

删除无用代码

sunyj 9 years ago
parent
commit
c385e988ca
45 changed files with 0 additions and 5372 deletions
  1. 0 95
      src/main/java/com/uas/report/jasperserver/api/JSException.java
  2. 0 77
      src/main/java/com/uas/report/jasperserver/api/JSExceptionWrapper.java
  3. 0 16
      src/main/java/com/uas/report/jasperserver/api/JasperServerAPI.java
  4. 0 32
      src/main/java/com/uas/report/jasperserver/api/common/domain/AttributedObject.java
  5. 0 68
      src/main/java/com/uas/report/jasperserver/api/common/domain/ExecutionContext.java
  6. 0 81
      src/main/java/com/uas/report/jasperserver/api/common/domain/ValidationError.java
  7. 0 66
      src/main/java/com/uas/report/jasperserver/api/common/domain/ValidationErrorFilter.java
  8. 0 75
      src/main/java/com/uas/report/jasperserver/api/common/domain/ValidationErrors.java
  9. 0 165
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/ContentResource.java
  10. 0 45
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/DataContainer.java
  11. 0 101
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/FileBufferedDataContainer.java
  12. 0 109
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/FileResource.java
  13. 0 50
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/FileResourceBase.java
  14. 0 108
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/FileResourceData.java
  15. 0 38
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/Folder.java
  16. 0 42
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/InternalURI.java
  17. 0 77
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/MemoryDataContainer.java
  18. 0 152
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/Resource.java
  19. 0 34
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/ResourceLookup.java
  20. 0 57
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/util/ComparableBlob.java
  21. 0 391
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/util/DataContainerStreamUtil.java
  22. 0 371
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/util/FileBufferedOutputStream.java
  23. 0 120
      src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/util/GzipDataContainer.java
  24. 0 63
      src/main/java/com/uas/report/jasperserver/api/metadata/common/service/JSResourceNotFoundException.java
  25. 0 873
      src/main/java/com/uas/report/jasperserver/api/metadata/common/service/RepositoryService.java
  26. 0 83
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/AncestorFolderFilter.java
  27. 0 126
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/Filter.java
  28. 0 291
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterCriteria.java
  29. 0 54
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterElement.java
  30. 0 139
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterElementCollection.java
  31. 0 67
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterElementConjunction.java
  32. 0 67
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterElementDisjunction.java
  33. 0 121
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterElementOr.java
  34. 0 90
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/NegatedFilterElement.java
  35. 0 89
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/ParentFolderFilter.java
  36. 0 242
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/PropertyFilter.java
  37. 0 133
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/ReferenceFilter.java
  38. 0 86
      src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/URIFilter.java
  39. 0 34
      src/main/java/com/uas/report/jasperserver/api/search/QueryModificationEvaluator.java
  40. 0 32
      src/main/java/com/uas/report/jasperserver/api/search/ResultTransformer.java
  41. 0 241
      src/main/java/com/uas/report/jasperserver/api/search/SearchCriteria.java
  42. 0 67
      src/main/java/com/uas/report/jasperserver/api/search/SearchCriteriaFactory.java
  43. 0 30
      src/main/java/com/uas/report/jasperserver/api/search/SearchFilter.java
  44. 0 43
      src/main/java/com/uas/report/jasperserver/api/search/SearchSorter.java
  45. 0 31
      src/main/java/com/uas/report/jasperserver/api/search/TransformerFactory.java

+ 0 - 95
src/main/java/com/uas/report/jasperserver/api/JSException.java

@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.uas.report.jasperserver.api;
-
-/**
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: JSException.java 58870 2015-10-27 22:30:55Z esytnik $
- */
-@JasperServerAPI
-public class JSException extends RuntimeException {
-
-	protected Object[] args;
-	private boolean wrapperObject;
-
-	public JSException(String message) {
-		super(message);
-	}
-
-	public JSException(String message, Throwable cause) {
-		super(message, cause);
-		this.wrapperObject = true;
-	}
-
-	public JSException(Throwable cause) {
-		super(cause);
-		this.wrapperObject = true;
-	}
-
-	public JSException(String message, Object[] args) {
-		super(message);
-		this.args = args;
-	}
-
-	/**
-	 * @return Returns the args.
-	 */
-	public Object[] getArgs() {
-		return args;
-	}
-
-	/**
-	 * @param args
-	 *            The args to set.
-	 */
-	public void setArgs(Object[] args) {
-		this.args = args;
-	}
-
-	/**
-	 * @return Returns the wrapperObject.
-	 */
-	public boolean isWrapperObject() {
-		return wrapperObject;
-	}
-
-	/**
-	 * @param wrapperObject
-	 *            The wrapperObject to set.
-	 */
-	public void setWrapperObject(boolean wrapperObject) {
-		this.wrapperObject = wrapperObject;
-	}
-
-	public String toString() {
-		StringBuilder builder = new StringBuilder(super.toString());
-		builder.append("\nArguments: ");
-		if (args != null) {
-			for (Object arg : args) {
-				builder.append(arg);
-				builder.append(',');
-			}
-		}
-		return builder.toString();
-	}
-
-}

+ 0 - 77
src/main/java/com/uas/report/jasperserver/api/JSExceptionWrapper.java

@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-/**
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: JSExceptionWrapper.java 47331 2014-07-18 09:13:06Z kklein $
- */
-public class JSExceptionWrapper extends JSException {
-
-	private final String stackTrace;
-
-	private final Exception originalException;
-
-	public JSExceptionWrapper(String message, Exception e) {
-		super(message, e);
-		originalException = e;
-		stackTrace = readStackTrace(e);
-	}
-
-	public JSExceptionWrapper(Exception e) {
-		this(e.getMessage(), e);
-	}
-
-	private String readStackTrace(Exception e) {
-		StringWriter sw = new StringWriter();
-		e.printStackTrace(new PrintWriter(sw));
-		return sw.toString();
-	}
-
-	public void printStackTrace() {
-		printStackTrace(System.err);
-	}
-
-	public void printStackTrace(java.io.PrintStream s) {
-		synchronized (s) {
-			s.print(getClass().getName() + ": ");
-			s.print(stackTrace);
-		}
-	}
-
-	public void printStackTrace(java.io.PrintWriter s) {
-		synchronized (s) {
-			s.print(getClass().getName() + ": ");
-			s.print(stackTrace);
-		}
-	}
-
-	public void rethrow() throws Exception {
-		throw originalException;
-	}
-
-	public Exception getOriginalException() {
-		return originalException;
-	}
-}

+ 0 - 16
src/main/java/com/uas/report/jasperserver/api/JasperServerAPI.java

@@ -1,16 +0,0 @@
-package com.uas.report.jasperserver.api;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @author bob
- *
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-public @interface JasperServerAPI {
-
-}

+ 0 - 32
src/main/java/com/uas/report/jasperserver/api/common/domain/AttributedObject.java

@@ -1,32 +0,0 @@
-package com.uas.report.jasperserver.api.common.domain;
-
-import java.util.List;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * Class which implements AttributedObject interface can keep a list of
- * attributes.
- *
- * @author swood
- * @version $Id: AttributedObject.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.0.1
- */
-@JasperServerAPI
-public interface AttributedObject {
-
-	/**
-	 * Returns a list of attributes for the object.
-	 *
-	 * @return a list of attributes for the object
-	 */
-	public List getAttributes();
-
-	/**
-	 * Sets a list of attributes for the object.
-	 *
-	 * @param attrs
-	 *            a list of attributes for the object.
-	 */
-	public void setAttributes(List attrs);
-}

+ 0 - 68
src/main/java/com/uas/report/jasperserver/api/common/domain/ExecutionContext.java

@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.common.domain;
-
-import java.util.Locale;
-import java.util.TimeZone;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * Context passed from calling code to the JasperServer APIs.
- * 
- * <p>
- * The context contains general attributes that are used by several JasperServer
- * API methods.
- * </p>
- * 
- * @author swood
- * @author Lucian Chirita
- * @author Ionut Nedelcu
- * @version $Id: ExecutionContext.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.0
- */
-@JasperServerAPI
-public interface ExecutionContext extends AttributedObject {
-
-	/**
-	 * Specifies the locale used in the calling code.
-	 * 
-	 * <p>
-	 * The locale is used when localized messages are constructed in API
-	 * methods, and when numerical and date values are formatted to text.
-	 * </p>
-	 * 
-	 * @return the locale used in the calling code
-	 */
-	Locale getLocale();
-
-	/**
-	 * Specifies the timezone used in the calling code.
-	 * 
-	 * <p>
-	 * The timezone is used when displaying date/time values as texts.
-	 * </p>
-	 * 
-	 * @return the timezone used in the calling code
-	 */
-	TimeZone getTimeZone();
-
-}

+ 0 - 81
src/main/java/com/uas/report/jasperserver/api/common/domain/ValidationError.java

@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.common.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * Error detected when validating objects according to rules defined in various
- * services.
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: ValidationError.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.0
- */
-@JasperServerAPI
-public interface ValidationError {
-	
-	/**
-	 * Returns the localization key of the error message.
-	 * 
-	 * <p>
-	 * The localized message is created by looking up the key in the resource
-	 * bundles.
-	 * </p>
-	 * 
-	 * @return the error message key
-	 * @see #getErrorArguments()
-	 * @see #getDefaultMessage()
-	 */
-	String getErrorCode();
-	
-	/**
-	 * Returns a list of values that are used to fill the placeholders in the 
-	 * localized error messages.
-	 * 
-	 * @return the values to use for the localized error message, or
-	 * <code>null</code> if the message does not include values
-	 */
-	Object[] getErrorArguments();
-	
-	/**
-	 * Returns a default message that should be used when the error message key
-	 * is not found in the localization resource bundles.
-	 * 
-	 * @return a default (non localized/English) error message
-	 */
-	String getDefaultMessage();
-	
-	/**
-	 * Returns the specific field of the object that failed to validate.
-	 * 
-	 * <p>
-	 * The field can be used in some cases in addition to the error code to
-	 * construct compound message keys that resolve to localized messages
-	 * specific to the field.
-	 * </p>
-	 * 
-	 * @return the object field that failed the validation, or <code>null</code>
-	 * if the error is not related to a particular field
-	 */
-	String getField();
-	
-}

+ 0 - 66
src/main/java/com/uas/report/jasperserver/api/common/domain/ValidationErrorFilter.java

@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.common.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * Filter that determines a subset of validation rules to check during a
- * validation operation.
- * 
- * @author Teodor Danciu (teodord@users.sourceforge.net)
- * @version $Id: ValidationError.java 8408 2007-05-29 23:29:12Z melih $
- * @since 2.1.0
- */
-@JasperServerAPI
-public interface ValidationErrorFilter 
-{
-
-	/**
-	 * Decides whether the rules associated to a specific error should
-	 * be checked during a validation operation.
-	 * 
-	 * @param error the error 
-	 * @return whether the specified error should be checked
-	 * @see #matchErrorCode(String)
-	 */
-	boolean matchError(ValidationError error);
-
-
-	/**
-	 * Decides whether the rules associated to a specific error code should
-	 * be checked during a validation operation.
-	 * 
-	 * @param errorCode the error code
-	 * @return whether the specified error should be checked
-	 */
-	boolean matchErrorCode(String errorCode);
-	
-	/**
-	 * Decides whether a specific field of the validation object should be
-	 * checked during the validation.
-	 * 
-	 * @param errorField the object field name
-	 * @return whether the specified field should be checked
-	 */
-	boolean matchErrorField(String errorField);
-
-}

+ 0 - 75
src/main/java/com/uas/report/jasperserver/api/common/domain/ValidationErrors.java

@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.common.domain;
-
-import java.util.List;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * The result of a validation operation, consisting of a set of validation
- * errors.
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: ValidationErrors.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.0
- */
-@JasperServerAPI
-public interface ValidationErrors {
-
-	/**
-	 * Determines whether any error has been detected during the validation.
-	 * 
-	 * @return <code>true</code> if the validation resulted in error(s)
-	 * @see #getErrors()
-	 */
-	boolean isError();
-
-	/**
-	 * Returns the list of errors detected during the validation.
-	 * 
-	 * @return the list of errors detected during the validation, empty if no
-	 *         errors were found
-	 */
-	List getErrors();
-
-	/**
-	 * Adds an error to the list of validation errors.
-	 * 
-	 * @param error
-	 *            the error to add
-	 * @since 1.2.0
-	 */
-	void add(ValidationError error);
-
-	/**
-	 * Removes any previously added errors that match a specified code and
-	 * field.
-	 * 
-	 * @param code
-	 *            the code of the errors to remove
-	 * @param field
-	 *            the field for which errors are to be removed
-	 * @since 3.0.0
-	 */
-	void removeError(String code, String field);
-
-}

+ 0 - 165
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/ContentResource.java

@@ -1,165 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain;
-
-import java.io.InputStream;
-import java.util.List;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * ContentResource is the interface which represents the JasperServer resource
- * containing some data of any type:
- * pdf,html,xls,rtf,csv,odt,txt,docx,ods,xlsx,img, pptx. It extends
- * {@link com.jaspersoft.jasperserver.api.metadata.common.domain.Resource}
- *
- * @version
- * @see com.jaspersoft.jasperserver.api.metadata.common.domain.client.
- *      ContentResourceImpl
- */
-
-@JasperServerAPI
-public interface ContentResource extends Resource {
-	String TYPE_PDF = "pdf";
-	String TYPE_HTML = "html";
-	String TYPE_XLS = "xls";
-	String TYPE_RTF = "rtf";
-	String TYPE_CSV = "csv";
-	String TYPE_ODT = "odt";
-	String TYPE_TXT = "txt";
-	String TYPE_DOCX = "docx";
-	String TYPE_ODS = "ods";
-	String TYPE_XLSX = "xlsx";
-	String TYPE_IMAGE = "img";// unspecified image type
-	String TYPE_PPTX = "pptx";
-	String TYPE_JSON = "json";
-	String TYPE_UNSPECIFIED = "contentResource";
-
-	/**
-	 * Returns <code>true</code> if the resource has some data.
-	 *
-	 * @return <code>true</code> if the resource has some data.
-	 */
-	boolean hasData();
-
-	/**
-	 * Returns the data stream from the data container of resource
-	 *
-	 * @return data stream of the resource
-	 */
-	InputStream getDataStream();
-
-	/**
-	 * Sets the data to the data container of resource
-	 *
-	 * @param is
-	 *            the input stream to be set
-	 */
-	void readData(InputStream is);
-
-	/**
-	 * Returns the data from the data container of resource as a byte array
-	 *
-	 * @return data
-	 */
-	byte[] getData();
-
-	/**
-	 * Sets the data to the data container of resource
-	 *
-	 * @param data
-	 *            the data
-	 */
-	void setData(byte[] data);
-
-	/**
-	 * Sets the data container to the resource
-	 *
-	 * @param dataContainer
-	 */
-	void setDataContainer(DataContainer dataContainer);
-
-	/**
-	 * Returns the size of the data container
-	 *
-	 * @return size
-	 */
-	public int getSize();
-
-	/**
-	 * Returns the file type contained in the resource
-	 *
-	 * @return file type
-	 */
-	String getFileType();
-
-	/**
-	 * Sets the file type contained in the resource
-	 *
-	 * @param fileType
-	 */
-	void setFileType(String fileType);
-
-	/**
-	 * Shows if the content resource is only a reference
-	 *
-	 * @return <code>true</code> if content resource is a reference
-	 */
-	boolean isReference();
-
-	/**
-	 * Returns the URI that the recource references to
-	 *
-	 * @return reference URI
-	 */
-	String getReferenceURI();
-
-	/**
-	 * Sets the URI that recource should reference to
-	 *
-	 * @param referenceURI
-	 */
-	void setReferenceURI(String referenceURI);
-
-	/**
-	 * Returns the list of subresources contained in this ContentResource
-	 *
-	 * @return list of resources
-	 */
-	public List getResources();
-
-	/**
-	 * Sets the list of subresources to this ContentResource
-	 *
-	 * @param resources
-	 */
-	public void setResources(List resources);
-
-	/**
-	 * Adds one more resource to the list of subresources of this
-	 * ContentResource
-	 *
-	 * @param child
-	 *            resource
-	 */
-	public void addChildResource(ContentResource child);
-
-}

+ 0 - 45
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/DataContainer.java

@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Serializable;
-
-/**
- * @author Lucian Chirita
- *
- */
-public interface DataContainer extends Serializable {
-
-	boolean hasData();
-
-	OutputStream getOutputStream();
-
-	int dataSize();
-
-	InputStream getInputStream();
-
-	byte[] getData();
-
-	void dispose();
-
-}

+ 0 - 101
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/FileBufferedDataContainer.java

@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.uas.report.jasperserver.api.metadata.common.domain;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import com.uas.report.jasperserver.api.JSExceptionWrapper;
-import com.uas.report.jasperserver.api.metadata.common.domain.util.DataContainerStreamUtil;
-import com.uas.report.jasperserver.api.metadata.common.domain.util.FileBufferedOutputStream;
-
-/**
- * @author Lucian Chirita
- * 
- */
-public class FileBufferedDataContainer implements DataContainer {
-
-	public static final int DEFAULT_MEMORY_THRESHOLD = 1 << 16;
-	public static final int DEFAULT_INITIAL_MEMORY_BUFFER = 1 << 14;
-
-	private int memoryThreshold;
-	private transient FileBufferedOutputStream data;
-
-	public FileBufferedDataContainer() {
-		this(DEFAULT_MEMORY_THRESHOLD, DEFAULT_INITIAL_MEMORY_BUFFER);
-	}
-
-	public FileBufferedDataContainer(int memoryThreshold, int initialMemoryBuffer) {
-		this.memoryThreshold = memoryThreshold;
-		createDataBuffer(initialMemoryBuffer);
-	}
-
-	private void createDataBuffer(int initialMemoryBuffer) {
-		data = new FileBufferedOutputStream(memoryThreshold, initialMemoryBuffer);
-	}
-
-	public OutputStream getOutputStream() {
-		return data;
-	}
-
-	public byte[] getData() {
-		return DataContainerStreamUtil.readDataAndClose(getInputStream());
-	}
-
-	public InputStream getInputStream() {
-		try {
-			return data.getDataInputStream();
-		} catch (IOException e) {
-			throw new JSExceptionWrapper(e);
-		}
-	}
-
-	public int dataSize() {
-		return data.size();
-	}
-
-	public boolean hasData() {
-		return true;
-	}
-
-	public void dispose() {
-		data.dispose();
-	}
-
-	private void writeObject(java.io.ObjectOutputStream stream) throws IOException {
-		stream.writeInt(memoryThreshold);
-
-		stream.writeInt(data.size());
-		DataContainerStreamUtil.writeObjectByteData(stream, data.getDataInputStream());
-	}
-
-	private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException {
-		memoryThreshold = stream.readInt();
-
-		int size = stream.readInt();
-		createDataBuffer(size <= memoryThreshold ? size : memoryThreshold);
-		DataContainerStreamUtil.readObjectByteData(stream, size, data);
-		data.close();
-	}
-
-}

+ 0 - 109
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/FileResource.java

@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain;
-
-import java.io.InputStream;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * FileResource is the interface which represents the JasperServer resource
- * containing some files of any type: images, fonts, jrxml, jar, resource
- * bundles, style templates, xml. It extends
- * {@link com.jaspersoft.jasperserver.api.metadata.common.domain.Resource}
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: FileResource.java 53873 2015-04-07 18:59:44Z mchan $
- */
-@JasperServerAPI
-public interface FileResource extends Resource, FileResourceBase {
-
-	/**
-	 * Returns <code>true</code> if the resource has some file.
-	 *
-	 * @return <code>true</code> if the resource has some file.
-	 */
-	boolean hasData();
-
-	/**
-	 * Returns the data stream of the file
-	 *
-	 * @return data stream of the file
-	 */
-	InputStream getDataStream();
-
-	/**
-	 * Sets the data of the file input stream
-	 *
-	 * @param is
-	 *            the input stream of file to be set
-	 */
-	void readData(InputStream is);
-
-	/**
-	 * Returns the data from the file as a byte array
-	 *
-	 * @return data
-	 */
-	byte[] getData();
-
-	/**
-	 * Sets the data of the file
-	 *
-	 * @param data
-	 */
-	void setData(byte[] data);
-
-	/**
-	 * Returns the file type
-	 *
-	 * @return file type
-	 */
-	String getFileType();
-
-	/**
-	 * Sets the file type
-	 *
-	 * @param fileType
-	 */
-	void setFileType(String fileType);
-
-	/**
-	 * Shows if the file resource is only a reference
-	 *
-	 * @return <code>true</code> if file resource is a reference
-	 */
-	boolean isReference();
-
-	/**
-	 * Returns the URI that the resource references to
-	 *
-	 * @return reference URI
-	 */
-	String getReferenceURI();
-
-	/**
-	 * Sets the URI that resource should reference to
-	 *
-	 * @param referenceURI
-	 */
-	void setReferenceURI(String referenceURI);
-}

+ 0 - 50
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/FileResourceBase.java

@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * FileResource is the interface which represents the JasperServer resource
- * containing some files of any type: images, fonts, jrxml, jar, resource
- * bundles, style templates, xml. It extends {@link Resource}
- *
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: FileResourceBase.java 62483 2016-04-12 17:26:07Z akasych $
- */
-@JasperServerAPI
-public interface FileResourceBase {
-	String TYPE_IMAGE = "img";
-	String TYPE_FONT = "font";
-	String TYPE_JRXML = "jrxml";
-	String TYPE_JAR = "jar";
-	String TYPE_RESOURCE_BUNDLE = "prop";
-	String TYPE_STYLE_TEMPLATE = "jrtx";
-	String TYPE_XML = "xml";
-	String TYPE_JSON = "json";
-	String TYPE_CSS = "css";
-	String TYPE_ACCESS_GRANT_SCHEMA = "accessGrantSchema";
-	String TYPE_MONGODB_JDBC_CONFIG = "config";
-	String TYPE_AZURE_CERTIFICATE = "cer";
-	String TYPE_SECURE_FILE = "secureFile";
-	String TYPE_DASHBOARD_COMPONENTS_SCHEMA = "dashboardComponent";
-
-}

+ 0 - 108
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/FileResourceData.java

@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain;
-
-import java.io.InputStream;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-import com.uas.report.jasperserver.api.metadata.common.domain.util.DataContainerStreamUtil;
-
-/**
- * The class represents the container for file resource data in JasperServer
- *
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: FileResourceData.java 47331 2014-07-18 09:13:06Z kklein $
- */
-@JasperServerAPI
-public class FileResourceData {
-	private final DataContainer dataContainer;
-
-	protected FileResourceData(FileResourceData parent) {
-		this.dataContainer = parent.dataContainer;
-	}
-
-	/**
-	 * Creates a new FileResourceData object from byte array data.
-	 *
-	 * @param data
-	 *            data byte array
-	 * @return FileResourceData object
-	 */
-	public FileResourceData(byte[] data) {
-		this.dataContainer = new MemoryDataContainer(data);
-	}
-
-	/**
-	 * Creates a new FileResourceData object from the input stream.
-	 *
-	 * @param is
-	 *            data input stream
-	 * @return FileResourceData object
-	 */
-	public FileResourceData(InputStream is) {
-		this.dataContainer = new FileBufferedDataContainer();
-		DataContainerStreamUtil.pipeData(is, this.dataContainer);
-	}
-
-	public FileResourceData(DataContainer dataContainer) {
-		this.dataContainer = dataContainer;
-	}
-
-	/**
-	 * Returns <code>true</code> if the container has some data.
-	 *
-	 * @return <code>true</code> if the container has some data.
-	 */
-	public boolean hasData() {
-		return dataContainer.hasData();
-	}
-
-	/**
-	 * Returns size of data contained in this file resource
-	 *
-	 * @return data size
-	 */
-	public int dataSize() {
-		return dataContainer.dataSize();
-	}
-
-	/**
-	 * Returns the data from the data container of resource as a byte array
-	 *
-	 * @return data
-	 */
-	public byte[] getData() {
-		return dataContainer.getData();
-	}
-
-	/**
-	 * Returns the data stream from the data container of resource
-	 *
-	 * @return data stream of the resource
-	 */
-	public InputStream getDataStream() {
-		return dataContainer.getInputStream();
-	}
-
-	public void dispose() {
-		dataContainer.dispose();
-	}
-}

+ 0 - 38
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/Folder.java

@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * Folder is the interface which represents the folder in the JasperServer. It
- * extends
- * {@link com.jaspersoft.jasperserver.api.metadata.common.domain.Resource}
- *
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: Folder.java 47331 2014-07-18 09:13:06Z kklein $
- * @see com.jaspersoft.jasperserver.api.metadata.common.domain.client.FolderImpl
- */
-@JasperServerAPI
-public interface Folder extends Resource {
-	static final String SEPARATOR = "/";
-	static final int SEPARATOR_LENGTH = SEPARATOR.length();
-}

+ 0 - 42
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/InternalURI.java

@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain;
-
-import org.springframework.security.acls.model.ObjectIdentity;
-
-/**
- * A URI reference to an object in our metadata
- * 
- * @author swood
- *
- */
-public interface InternalURI extends ObjectIdentity {
-
-	public String getURI();
-
-	public String getPath();
-
-	public String getProtocol();
-
-	public String getParentURI();
-
-	public String getParentPath();
-}

+ 0 - 77
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/MemoryDataContainer.java

@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.uas.report.jasperserver.api.metadata.common.domain;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * @author Lucian Chirita
- *
- */
-public class MemoryDataContainer implements DataContainer {
-
-	private byte[] data;
-
-	public MemoryDataContainer() {
-		this(null);
-	}
-
-	public MemoryDataContainer(byte[] data) {
-		this.data = data;
-	}
-
-	public OutputStream getOutputStream() {
-		return new DataOutputStream();
-	}
-
-	public int dataSize() {
-		return data == null ? 0 : data.length;
-	}
-
-	public InputStream getInputStream() {
-		return data == null ? null : new ByteArrayInputStream(data);
-	}
-
-	public byte[] getData() {
-		return data;
-	}
-
-	public boolean hasData() {
-		return data != null;
-	}
-
-	protected class DataOutputStream extends ByteArrayOutputStream {
-		public void close() throws IOException {
-			super.close();
-			data = toByteArray();
-		}
-	}
-
-	public void dispose() {
-		// help GC
-		data = null;
-	}
-}

+ 0 - 152
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/Resource.java

@@ -1,152 +0,0 @@
-package com.uas.report.jasperserver.api.metadata.common.domain;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import com.uas.report.jasperserver.api.common.domain.AttributedObject;
-
-public interface Resource extends AttributedObject, InternalURI, Serializable {
-	public static String URI_PROTOCOL = "repo";
-
-	int VERSION_NEW = -1;
-
-	/**
-	 * Returns the version of the resource.
-	 *
-	 * @return version number
-	 */
-	public int getVersion();
-
-	/**
-	 * Sets the version for the resource.
-	 *
-	 * @param version
-	 */
-	public void setVersion(int version);
-
-	/**
-	 * Returns the URI address of the resource.
-	 *
-	 * @return URI
-	 */
-	public String getURIString();
-
-	/**
-	 * Sets the URI address for the resource.
-	 *
-	 * @param uri
-	 */
-	public void setURIString(String uri);
-
-	/**
-	 * Returns the URI address of parent folder of the resource.
-	 *
-	 * @return URI
-	 */
-	public String getParentFolder();
-
-	/**
-	 * Sets the URI address of parent folder for the resource.
-	 *
-	 * @param uri
-	 */
-	public void setParentFolder(String uri);
-
-	/**
-	 * Sets the reference of parent folder for the resource.
-	 *
-	 * @param folder
-	 */
-	public void setParentFolder(Folder folder);
-
-	/**
-	 * Returns the name of the resource.
-	 *
-	 * @return name
-	 */
-	public String getName();
-
-	/**
-	 * Sets the name of the resource.
-	 *
-	 * @param name
-	 */
-	public void setName(String name);
-
-	/**
-	 * Returns the label of the resource.
-	 *
-	 * @return label
-	 */
-	public String getLabel();
-
-	/**
-	 * Sets the label of the resource.
-	 *
-	 * @param label
-	 */
-	public void setLabel(String label);
-
-	/**
-	 * Returns the description of the resource.
-	 *
-	 * @return description
-	 */
-	public String getDescription();
-
-	/**
-	 * Sets the description of the resource.
-	 *
-	 * @param description
-	 */
-	public void setDescription(String description);
-
-	/**
-	 * Returns the name of actual resource class.
-	 *
-	 * @return class name
-	 */
-	public String getResourceType();
-
-	/**
-	 * Compares the types of two resources.
-	 *
-	 * @return <code>true</code> if the resources have same type.
-	 */
-	public boolean isSameType(Resource resource);
-
-	/**
-	 * Returns the date when resource was created.
-	 *
-	 * @return date
-	 */
-	public Date getCreationDate();
-
-	/**
-	 * Sets the resource creation date.
-	 *
-	 * @param timestamp
-	 */
-	public void setCreationDate(Date timestamp);
-
-	/**
-	 * Returns the date when resource was updated last time.
-	 *
-	 * @return date
-	 */
-	public Date getUpdateDate();
-
-	/**
-	 * Sets the resource update date.
-	 *
-	 * @param timestamp
-	 */
-	public void setUpdateDate(Date timestamp);
-
-	/**
-	 * Returns <code>true</code> if the resource was never updated yet.
-	 *
-	 * @return <code>true</code> if the resource is new
-	 */
-	public boolean isNew();
-}

+ 0 - 34
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/ResourceLookup.java

@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id:ResourceLookup.java 2403 2006-03-16 14:08:12Z lucian $
- */
-@JasperServerAPI
-public interface ResourceLookup extends Resource {
-	void setURI(String uri);
-
-	void setResourceType(String resourceType);
-}

+ 0 - 57
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/util/ComparableBlob.java

@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain.util;
-
-import java.sql.Blob;
-
-import org.hibernate.lob.BlobImpl;
-import org.hibernate.lob.SerializableBlob;
-
-public class ComparableBlob extends SerializableBlob {
-	private static final long serialVersionUID = -7928795808929208452L;
-	private byte[] bytes;
-	private transient Blob myBlob;
-
-	public ComparableBlob(byte[] bytes) {
-		super(new BlobImpl(bytes));
-		this.bytes = bytes;
-	}
-
-	// superclass implements Serializable but doesn't actually work after
-	// serialization, so can't be cached.
-	// we are saving the byte[] so we can create blob as needed
-	public Blob getWrappedBlob() {
-		if (myBlob == null) {
-			myBlob = new BlobImpl(bytes);
-		}
-		return myBlob;
-	}
-
-	// same byte array? fine!
-	public boolean equals(Object o) {
-		return o instanceof ComparableBlob && ((ComparableBlob) o).bytes == bytes;
-	}
-
-	public byte[] getBytes() {
-		return bytes;
-	}
-
-}

+ 0 - 391
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/util/DataContainerStreamUtil.java

@@ -1,391 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain.util;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-import java.sql.Blob;
-import java.sql.SQLException;
-import java.util.zip.CRC32;
-import java.util.zip.Deflater;
-import java.util.zip.DeflaterOutputStream;
-import java.util.zip.GZIPInputStream;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.bouncycastle.util.Arrays;
-
-import com.uas.report.jasperserver.api.JSException;
-import com.uas.report.jasperserver.api.JSExceptionWrapper;
-import com.uas.report.jasperserver.api.metadata.common.domain.DataContainer;
-
-/**
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: DataContainerStreamUtil.java 47331 2014-07-18 09:13:06Z kklein
- *          $
- */
-public class DataContainerStreamUtil {
-	private static final Log log = LogFactory.getLog(DataContainerStreamUtil.class);
-	private static final int READ_STREAM_BUFFER_SIZE = 10000;
-
-	public static byte[] readData(InputStream is) {
-		if (is == null) {
-			return null;
-		}
-
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
-		byte[] bytes = new byte[READ_STREAM_BUFFER_SIZE];
-		int ln = 0;
-		try {
-			while ((ln = is.read(bytes)) > 0) {
-				baos.write(bytes, 0, ln);
-			}
-		} catch (IOException e) {
-			log.error("Error while reading data.", e);
-			throw new JSExceptionWrapper(e);
-		}
-
-		return baos.toByteArray();
-	}
-
-	public static byte[] readDataAndClose(InputStream is) {
-		try {
-			return readData(is);
-		} finally {
-			close(is);
-		}
-	}
-
-	public static byte[] readData(InputStream is, int size) {
-		if (is == null) {
-			return null;
-		}
-
-		try {
-			byte[] data = new byte[size];
-			int offset = 0;
-			while (size > 0) {
-				int read = is.read(data, offset, size);
-				if (read < 0) {
-					throw new JSException("jsexception.input.stream.exhausted", new Object[] { new Integer(size) });
-				}
-				offset += read;
-				size -= read;
-			}
-			return data;
-		} catch (IOException e) {
-			log.error("Error while reading data.", e);
-			throw new JSExceptionWrapper(e);
-		}
-	}
-
-	public static byte[] readData(Blob blob) {
-		if (blob == null) {
-			return null;
-		}
-		// this is ComparableBlob--we can get the bytes
-		if (blob instanceof ComparableBlob) {
-			return ((ComparableBlob) blob).getBytes();
-		}
-
-		try {
-			return readData(blob.getBinaryStream());
-		} catch (SQLException e) {
-			log.error("Error while reading blob data", e);
-			throw new JSExceptionWrapper(e);
-		}
-	}
-
-	public static void pipeData(InputStream is, OutputStream os) throws IOException {
-		if (is == null) {
-			return;
-		}
-
-		byte[] bytes = new byte[READ_STREAM_BUFFER_SIZE];
-		int ln = 0;
-		while ((ln = is.read(bytes)) > 0) {
-			os.write(bytes, 0, ln);
-		}
-	}
-
-	public static void pipeDataAndCloseInput(InputStream is, OutputStream os) throws IOException {
-		try {
-			pipeData(is, os);
-		} finally {
-			close(is);
-		}
-	}
-
-	protected static void close(InputStream is) {
-		try {
-			is.close();
-		} catch (IOException e) {
-			log.warn("Failed to close input stream " + is, e);
-		}
-	}
-
-	public static void writeObjectByteData(ObjectOutputStream objectStream, InputStream data) throws IOException {
-		pipeData(data, objectStream);
-	}
-
-	public static void readObjectByteData(ObjectInputStream objectStream, int size, OutputStream outStream)
-			throws IOException {
-		byte[] buffer = new byte[READ_STREAM_BUFFER_SIZE];
-
-		while (size > 0) {
-			int read = buffer.length;
-			if (read > size) {
-				read = size;
-			}
-			objectStream.readFully(buffer, 0, read);
-
-			outStream.write(buffer, 0, read);
-
-			size -= read;
-		}
-	}
-
-	public static void pipeData(InputStream is, DataContainer dataContainer) {
-		boolean close = true;
-		OutputStream out = dataContainer.getOutputStream();
-		try {
-			pipeData(is, out);
-
-			close = false;
-			out.close();
-		} catch (IOException e) {
-			throw new JSExceptionWrapper(e);
-		} finally {
-			if (close) {
-				try {
-					out.close();
-				} catch (IOException e) {
-					log.error("Error closing stream", e);
-				}
-			}
-		}
-	}
-
-	public static DataContainer pipeGzipSniffedData(InputStream is, DataContainer dataContainer) {
-		GzipSniffInputStream gzipSniffInput = new GzipSniffInputStream(is);
-		pipeData(gzipSniffInput, dataContainer);
-
-		if (gzipSniffInput.isAutoGzip()) {
-			// if the input was gzip, find out the uncompressed length and
-			// create a
-			// data container that transparently inflates the data
-			int uncompressedLength = gzipSniffInput.gzipUncompressedLength();
-			return new GzipDataContainer(dataContainer, uncompressedLength);
-		}
-
-		return dataContainer;
-	}
-
-	protected static class GzipSniffInputStream extends FilterInputStream {
-
-		private static final int LENGTH_TRAILER_SIZE = 4;
-
-		// store the first 2 bytes read
-		private int headerOffset = 0;
-		private final byte[] header = new byte[GZIP_HEADER.length];
-
-		// store the last 4 bytes read as a circular buffer
-		private int trailerOffset = 0;
-		private final byte[] trailer = new byte[LENGTH_TRAILER_SIZE];
-
-		public GzipSniffInputStream(InputStream in) {
-			super(in);
-		}
-
-		private void bufferHeader(byte b) {
-			if (headerOffset < header.length) {
-				header[headerOffset] = b;
-				++headerOffset;
-			}
-		}
-
-		private void bufferHeader(byte[] b, int off, int read) {
-			if (headerOffset < header.length) {
-				int count = Math.min(header.length - headerOffset, read);
-				System.arraycopy(b, off, header, headerOffset, count);
-				headerOffset += count;
-			}
-		}
-
-		private void bufferTrailer(byte b) {
-			trailer[trailerOffset] = b;
-			++trailerOffset;
-			if (trailerOffset == LENGTH_TRAILER_SIZE) {
-				trailerOffset = 0;
-			}
-		}
-
-		private void bufferTrailer(byte[] b, int off, int read) {
-			int lastCount = Math.min(read, LENGTH_TRAILER_SIZE);
-			for (int i = 0; i < lastCount; ++i) {
-				// adding one by one, which is not the fastest way
-				bufferTrailer(b[off + read - lastCount + i]);
-			}
-		}
-
-		@Override
-		public int read() throws IOException {
-			int read = super.read();
-			if (read >= 0) {
-				byte b = (byte) (read & 0xff);
-				bufferHeader(b);
-				bufferTrailer(b);
-			}
-			return read;
-		}
-
-		@Override
-		public int read(byte[] b, int off, int len) throws IOException {
-			int read = super.read(b, off, len);
-			if (read > 0) {
-				bufferHeader(b, off, read);
-				bufferTrailer(b, off, read);
-			}
-			return read;
-		}
-
-		public boolean isAutoGzip() {
-			if (headerOffset < GZIP_HEADER.length) {
-				return false;
-			}
-
-			// check if the header bytes match our gzip header
-			boolean isGzip = Arrays.areEqual(header, GZIP_HEADER);
-
-			if (isGzip && log.isDebugEnabled()) {
-				log.debug("detected gzip stream");
-			}
-
-			return isGzip;
-		}
-
-		public int gzipUncompressedLength() {
-			// the length is the last 4 bytes in little endian order
-			// FIXME this limits to 2^32 bytes, we sould have that check in the
-			// output stream
-			int length = (trailer[trailerOffset] & 0xff)
-					| ((trailer[(trailerOffset + 1) % LENGTH_TRAILER_SIZE] & 0xff) << 8)
-					| ((trailer[(trailerOffset + 2) % LENGTH_TRAILER_SIZE] & 0xff) << 16)
-					| ((trailer[(trailerOffset + 3) % LENGTH_TRAILER_SIZE] & 0xff) << 24);
-
-			if (log.isDebugEnabled()) {
-				log.debug("gzip uncompressed length " + length);
-			}
-
-			return length;
-		}
-	}
-
-	public static DataContainer createCompressedContainer(DataContainer container) {
-		return new GzipDataContainer(container);
-	}
-
-	public static DataContainer getRawDataContainer(DataContainer container) {
-		// ugly cast
-		if (container instanceof GzipDataContainer) {
-			// return the compressed data
-			return ((GzipDataContainer) container).getDecorated();
-		}
-
-		return container;
-	}
-
-	private static final byte[] GZIP_HEADER = new byte[] { (byte) GZIPInputStream.GZIP_MAGIC,
-			(byte) (GZIPInputStream.GZIP_MAGIC >> 8), Deflater.DEFLATED, // Compression
-																			// method
-																			// (CM)
-			16, // using FCOMMENT
-			0, 0, 0, 0, 0, 0, 'j', // the comment
-			'r', 's', 'a', 0, };
-
-	// directly extending DeflaterOutputStream because we are writing a custom
-	// gzip header
-	protected static class CompressedOutputStream extends DeflaterOutputStream {
-		private CRC32 crc;
-
-		public CompressedOutputStream(OutputStream out) throws IOException {
-			// using default compression
-			super(out, new Deflater(Deflater.DEFAULT_COMPRESSION, true));
-
-			crc = new CRC32();
-			crc.reset();
-
-			// write the header
-			out.write(GZIP_HEADER);
-		}
-
-		@Override
-		public synchronized void write(byte[] buf, int off, int len) throws IOException {
-			super.write(buf, off, len);
-
-			crc.update(buf, off, len);
-		}
-
-		@Override
-		public void finish() throws IOException {
-			// deflate finish
-			super.finish();
-
-			// write the trailer
-			int crcValue = (int) crc.getValue();
-			int size = getUncompressedSize();
-
-			if (log.isDebugEnabled()) {
-				log.debug("writing gzip trailer for crc " + crcValue + ", length " + size);
-			}
-
-			byte[] trailer = new byte[] { (byte) (crcValue & 0xff), (byte) ((crcValue >> 8) & 0xff),
-					(byte) ((crcValue >> 16) & 0xff), (byte) ((crcValue >> 24) & 0xff), (byte) (size & 0xff),
-					(byte) ((size >> 8) & 0xff), (byte) ((size >> 16) & 0xff), (byte) ((size >> 24) & 0xff), };
-			out.write(trailer);
-		}
-
-		protected int getUncompressedSize() {
-			return def.getTotalIn();
-		}
-	}
-
-	// Methods to create a blob that can be compared successfully for equality
-	// as long as the byte arrays haven't been touched.
-
-	public static Blob createComparableBlob(Blob blob) {
-		return createComparableBlob(DataContainerStreamUtil.readData(blob));
-	}
-
-	public static Blob createComparableBlob(InputStream stream) {
-		return createComparableBlob(DataContainerStreamUtil.readData(stream));
-	}
-
-	public static Blob createComparableBlob(byte[] data) {
-		return new ComparableBlob(data);
-	}
-}

+ 0 - 371
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/util/FileBufferedOutputStream.java

@@ -1,371 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain.util;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.WeakHashMap;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import com.uas.report.jasperserver.api.JSException;
-
-import net.sf.jasperreports.engine.DefaultJasperReportsContext;
-import net.sf.jasperreports.engine.JRPropertiesUtil;
-
-/**
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: FileBufferedOutputStream.java 61296 2016-02-25 21:53:37Z mchan
- *          $
- */
-public class FileBufferedOutputStream extends OutputStream {
-
-	private static final Log log = LogFactory.getLog(FileBufferedOutputStream.class);
-
-	/**
-	 * Specifies the maximum in-memory buffer length that triggers the creation
-	 * of a temporary file on disk to store further content sent to this output
-	 * stream.
-	 */
-	public static final String PROPERTY_MEMORY_THRESHOLD = JRPropertiesUtil.PROPERTY_PREFIX
-			+ "file.buffer.os.memory.threshold";
-	// public static final int DEFAULT_MEMORY_THRESHOLD = 1 << 18;
-	public static final int INFINIT_MEMORY_THRESHOLD = -1;
-	public static final int DEFAULT_INITIAL_MEMORY_BUFFER_SIZE = 1 << 16;
-	public static final int DEFAULT_INPUT_BUFFER_LENGTH = 1 << 14;
-
-	private final int memoryThreshold;
-	private final int initialMemoryBufferSize;
-	private final int inputBufferLength;
-
-	private final ByteArrayOutputStream memoryOutput;
-	private int size;
-	private File file;
-	private BufferedOutputStream fileOutput;
-	private boolean closed;
-	private boolean disposed;
-
-	private final WeakHashMap<DataStream, Boolean> inputStreams;
-
-	public FileBufferedOutputStream() {
-		this(JRPropertiesUtil.getInstance(DefaultJasperReportsContext.getInstance())
-				.getIntegerProperty(PROPERTY_MEMORY_THRESHOLD, INFINIT_MEMORY_THRESHOLD),
-				DEFAULT_INITIAL_MEMORY_BUFFER_SIZE, DEFAULT_INPUT_BUFFER_LENGTH);
-	}
-
-	public FileBufferedOutputStream(int memoryThreshold) {
-		this(memoryThreshold, DEFAULT_INITIAL_MEMORY_BUFFER_SIZE, DEFAULT_INPUT_BUFFER_LENGTH);
-	}
-
-	public FileBufferedOutputStream(int memoryThreshold, int initialMemoryBufferSize) {
-		this(memoryThreshold, initialMemoryBufferSize, DEFAULT_INPUT_BUFFER_LENGTH);
-	}
-
-	public FileBufferedOutputStream(int memoryThreshold, int initialMemoryBufferSize, int inputBufferLength) {
-		this.memoryThreshold = memoryThreshold;
-		this.initialMemoryBufferSize = initialMemoryBufferSize;
-		this.inputBufferLength = inputBufferLength;
-
-		size = 0;
-		if (this.memoryThreshold == 0) {
-			memoryOutput = null;
-		} else {
-			int initialSize = this.initialMemoryBufferSize;
-			if (initialSize > this.memoryThreshold) {
-				initialSize = this.memoryThreshold;
-			}
-			memoryOutput = new ByteArrayOutputStream(initialSize);
-		}
-
-		this.inputStreams = new WeakHashMap<DataStream, Boolean>();
-	}
-
-	public void write(int b) throws IOException {
-		checkClosed();
-
-		if (availableMemorySpace() > 0) {
-			memoryOutput.write(b);
-		} else {
-			ensureFileOutput().write(b);
-		}
-
-		++size;
-	}
-
-	protected int availableMemorySpace() {
-		int availableMemorySpace;
-		if (memoryOutput != null && (memoryThreshold < 0 || memoryOutput.size() < memoryThreshold)) {
-			availableMemorySpace = memoryThreshold - memoryOutput.size();
-		} else {
-			availableMemorySpace = 0;
-		}
-		return availableMemorySpace;
-	}
-
-	protected BufferedOutputStream ensureFileOutput() throws IOException, FileNotFoundException {
-		if (fileOutput == null) {
-			file = File.createTempFile("file.buff.os.", ".tmp");
-			FileOutputStream fileOutputStream = new FileOutputStream(file);
-			fileOutput = new BufferedOutputStream(fileOutputStream);
-		}
-		return fileOutput;
-	}
-
-	public void write(byte[] b, int off, int len) throws IOException {
-		checkClosed();
-
-		int memoryLen = availableMemorySpace();
-		if (len < memoryLen) {
-			memoryLen = len;
-		}
-
-		if (memoryLen > 0) {
-			memoryOutput.write(b, off, memoryLen);
-		}
-
-		if (memoryLen < len) {
-			ensureFileOutput().write(b, off + memoryLen, len - memoryLen);
-		}
-
-		size += len;
-	}
-
-	public void checkClosed() {
-		if (closed) {
-			throw new JSException("Output stream already closed.");
-		}
-	}
-
-	public void close() throws IOException {
-		if (!closed && fileOutput != null) {
-			fileOutput.flush();
-			fileOutput.close();
-		}
-
-		closed = true;
-	}
-
-	public void flush() throws IOException {
-		if (fileOutput != null) {
-			fileOutput.flush();
-		}
-	}
-
-	public int size() {
-		return size;
-	}
-
-	public void writeData(OutputStream out) throws IOException {
-		if (!closed) {
-			close();
-		}
-
-		if (memoryOutput != null) {
-			memoryOutput.writeTo(out);
-		}
-
-		if (file != null) {
-			FileInputStream fileInput = new FileInputStream(file);
-			boolean inputClosed = false;
-			try {
-				byte[] buffer = new byte[inputBufferLength];
-				int read;
-				while ((read = fileInput.read(buffer)) > 0) {
-					out.write(buffer, 0, read);
-				}
-				fileInput.close();
-				inputClosed = true;
-			} finally {
-				if (!inputClosed) {
-					try {
-						fileInput.close();
-					} catch (IOException e) {
-						log.warn("Could not close file input stream", e);
-					}
-				}
-			}
-		}
-	}
-
-	public void dispose() {
-		if (disposed) {
-			return;
-		}
-
-		boolean success = true;
-		if (!closed && fileOutput != null) {
-			try {
-				fileOutput.close();
-			} catch (IOException e) {
-				log.warn("Error while closing the temporary file output stream", e);
-				success = false;
-			}
-		}
-
-		for (DataStream dataStream : inputStreams.keySet()) {
-			try {
-				dataStream.close();
-			} catch (IOException e) {
-				log.warn("Error while closing temporary file input stream", e);
-				success = false;
-			}
-		}
-
-		if (file != null && !file.delete()) {
-			log.warn("Error while deleting the temporary file");
-			success = false;
-		}
-
-		disposed = success;
-	}
-
-	protected void finalize() throws Throwable {
-		dispose();
-		super.finalize();
-	}
-
-	public InputStream getDataInputStream() throws IOException {
-		if (!closed) {
-			close();
-		}
-
-		DataStream dataStream = new DataStream();
-		// keep for dispose()
-		inputStreams.put(dataStream, Boolean.TRUE);
-		return dataStream;
-	}
-
-	protected class DataStream extends InputStream {
-		private int memoryIdx;
-		private int memoryLength;
-
-		private final InputStream byteInputStream;
-		private final InputStream fileInput;
-
-		public DataStream() throws FileNotFoundException, IOException {
-			memoryIdx = 0;
-			byte[] memoryData = memoryOutput == null ? new byte[0] : memoryOutput.toByteArray();
-			memoryLength = memoryData.length;
-			byteInputStream = new ByteArrayInputStream(memoryData);
-			fileInput = file == null ? null : new BufferedInputStream(new FileInputStream(file));
-		}
-
-		public synchronized int read() throws IOException {
-			int read;
-
-			if (memoryIdx < memoryLength) {
-				read = byteInputStream.read();
-				++memoryIdx;
-			} else if (fileInput != null) {
-				read = fileInput.read();
-			} else {
-				read = -1;
-			}
-			return read;
-		}
-
-		public synchronized int read(byte b[], int off, int len) throws IOException {
-			if (len <= 0) {
-				return 0;
-			}
-
-			int read;
-			if (memoryIdx < memoryLength) {
-				read = len;
-				if (read > memoryLength - memoryIdx) {
-					read = memoryLength - memoryIdx;
-				}
-
-				byteInputStream.read(b, off, read);
-				memoryIdx += read;
-
-			} else {
-				read = 0;
-			}
-
-			if (read < len && fileInput != null) {
-				int readFile = fileInput.read(b, off + read, len - read);
-				if (readFile > 0) {
-					read += readFile;
-				}
-			}
-
-			return read == 0 ? -1 : read;
-		}
-
-		public void close() throws IOException {
-
-			if (fileInput != null) {
-				fileInput.close();
-			}
-		}
-
-		public synchronized int available() throws IOException {
-			int available = byteInputStream.available();
-			if (fileInput != null) {
-				available += fileInput.available();
-			}
-
-			return available;
-		}
-
-		public synchronized long skip(long n) throws IOException {
-			if (n <= 0) {
-				return 0;
-			}
-
-			long skipped;
-			if (memoryIdx < memoryLength) {
-				skipped = n;
-				if (skipped > memoryLength - memoryIdx) {
-					skipped = memoryLength - memoryIdx;
-				}
-
-				skipped = byteInputStream.skip(skipped);
-				memoryIdx += skipped;
-			} else {
-				skipped = 0;
-			}
-
-			if (skipped < n && fileInput != null) {
-				skipped += fileInput.skip(n - skipped);
-			}
-
-			return skipped;
-		}
-
-		protected void finalize() throws Throwable {
-			close();
-			super.finalize();
-		}
-
-	}
-}

+ 0 - 120
src/main/java/com/uas/report/jasperserver/api/metadata/common/domain/util/GzipDataContainer.java

@@ -1,120 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.domain.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.zip.GZIPInputStream;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import com.uas.report.jasperserver.api.JSExceptionWrapper;
-import com.uas.report.jasperserver.api.metadata.common.domain.DataContainer;
-
-/**
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: GzipDataContainer.java 47331 2014-07-18 09:13:06Z kklein $
- */
-public class GzipDataContainer implements DataContainer {
-
-	private static final Log log = LogFactory.getLog(GzipDataContainer.class);
-
-	private final DataContainer decorated;
-
-	private DataContainerStreamUtil.CompressedOutputStream compressedOut;
-	private int uncompressedSize;
-
-	public GzipDataContainer(DataContainer decorated) {
-		this.decorated = decorated;
-	}
-
-	public GzipDataContainer(DataContainer decorated, int uncompressedSize) {
-		this(decorated);
-		this.uncompressedSize = uncompressedSize;
-	}
-
-	public boolean hasData() {
-		return decorated.hasData();
-	}
-
-	public OutputStream getOutputStream() {
-		if (compressedOut == null) {
-			OutputStream out = decorated.getOutputStream();
-			try {
-				compressedOut = new DataContainerStreamUtil.CompressedOutputStream(out) {
-					@Override
-					public void close() throws IOException {
-						super.close();
-
-						// set the final uncompressed size
-						GzipDataContainer.this.uncompressedSize = getUncompressedSize();
-					}
-				};
-				return compressedOut;
-			} catch (IOException e) {
-				throw new JSExceptionWrapper(e);
-			}
-		}
-
-		return compressedOut;
-	}
-
-	public int dataSize() {
-		return uncompressedSize;
-	}
-
-	public InputStream getInputStream() {
-		InputStream in = decorated.getInputStream();
-		if (in == null) {
-			return null;
-		}
-
-		try {
-			return new GZIPInputStream(in);
-		} catch (IOException e) {
-			throw new JSExceptionWrapper(e);
-		}
-	}
-
-	public byte[] getData() {
-		return DataContainerStreamUtil.readDataAndClose(getInputStream());
-	}
-
-	public DataContainer getDecorated() {
-		return decorated;
-	}
-
-	public void dispose() {
-		if (compressedOut != null) {
-			try {
-				compressedOut.close();
-			} catch (IOException e) {
-				if (log.isDebugEnabled()) {
-					log.debug("Failed to close output stream", e);
-				}
-			}
-		}
-
-		decorated.dispose();
-	}
-}

+ 0 - 63
src/main/java/com/uas/report/jasperserver/api/metadata/common/service/JSResourceNotFoundException.java

@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.common.service;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-import com.uas.report.jasperserver.api.JSException;
-
-/**
- * Exception thrown when a operation that expects to find a resource in the
- * repository at a specified path fails to locate the resource.
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: JSResourceNotFoundException.java 47331 2014-07-18 09:13:06Z
- *          kklein $
- * @since 1.0
- */
-@JasperServerAPI
-public class JSResourceNotFoundException extends JSException {
-
-	/**
-	 * Creates a resource not found exception.
-	 * 
-	 * @param message
-	 *            the exception message
-	 * @see JSException#JSException(String)
-	 */
-	public JSResourceNotFoundException(String message) {
-		super(message);
-	}
-
-	/**
-	 * Creates a resource not found exception.
-	 * 
-	 * @param message
-	 *            the exception message
-	 * @param args
-	 *            the arguments for the message, used when the message is
-	 *            interpreted as the key of a localized message
-	 * @see JSException#JSException(String, Object[])
-	 * @since 1.2.1
-	 */
-	public JSResourceNotFoundException(String message, Object[] args) {
-		super(message, args);
-	}
-}

+ 0 - 873
src/main/java/com/uas/report/jasperserver/api/metadata/common/service/RepositoryService.java

@@ -1,873 +0,0 @@
-package com.uas.report.jasperserver.api.metadata.common.service;
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.transform.TransformerFactory;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-import com.uas.report.jasperserver.api.common.domain.ExecutionContext;
-import com.uas.report.jasperserver.api.common.domain.ValidationErrorFilter;
-import com.uas.report.jasperserver.api.common.domain.ValidationErrors;
-import com.uas.report.jasperserver.api.metadata.common.domain.ContentResource;
-import com.uas.report.jasperserver.api.metadata.common.domain.FileResource;
-import com.uas.report.jasperserver.api.metadata.common.domain.FileResourceData;
-import com.uas.report.jasperserver.api.metadata.common.domain.Folder;
-import com.uas.report.jasperserver.api.metadata.common.domain.Resource;
-import com.uas.report.jasperserver.api.metadata.common.domain.ResourceLookup;
-import com.uas.report.jasperserver.api.metadata.view.domain.FilterCriteria;
-import com.uas.report.jasperserver.api.search.SearchCriteriaFactory;
-import com.uas.report.jasperserver.api.search.SearchFilter;
-import com.uas.report.jasperserver.api.search.SearchSorter;
-
-/**
- * Top level class for accessing the repository metadata.
- * 
- * <p>
- * This class has various methods for retrieving resources from the repository
- * and for uploading resources to the repository.
- * </p>
- * 
- * @author Teodor Danciu (teodord@users.sourceforge.net)
- * @author Sherman Wood
- * @author Lucian Chirita
- * @author Tony Kavanagh
- * @author Ionut Nedelcu
- * @author Bob Tinsman
- * @author Andrew Sokolnikov
- * @author Stas Chubar
- * @author Yuri Plakosh
- * @version $Id: RepositoryService.java 63380 2016-05-26 20:56:46Z mchan $
- * @since 1.0
- */
-@JasperServerAPI
-public interface RepositoryService {
-	/**
-	 * To be used as an attribute of execution context and mark the current
-	 * operation as importing or overwriting the resource
-	 */
-	public static final String IS_IMPORTING = "isImporting";
-	public static final String IS_OVERWRITING = "isOverwriting";
-
-	/**
-	 * Retrieves the full details of a resource from the repository.
-	 * 
-	 * <p>
-	 * For resources that include binary data (such as {@link FileResource} and
-	 * {@link ContentResource}), the data will not be returned by this method
-	 * and a separate call needs to be made if the data is required.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param uri
-	 *            the path of the resource in the repository
-	 * @return the resource if found or <code>null</code> otherwise
-	 * @see #getResourceData(ExecutionContext, String)
-	 * @see #getContentResourceData(ExecutionContext, String)
-	 * @see #getResource(ExecutionContext, String, Class)
-	 */
-	public Resource getResource(ExecutionContext context, String uri);
-
-	/**
-	 * Retrieves the full details of a resource from the repository.
-	 * 
-	 * <p>
-	 * This method is preferred over
-	 * {@link #getResource(ExecutionContext, String)} when the expected type of
-	 * the resource is known. If a resource exists in the repository at the
-	 * specified path but is not of the expected type, <code>null</code> will be
-	 * returned.
-	 * </p>
-	 * 
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param uri
-	 *            the path of the resource in the repository
-	 * @param resourceType
-	 *            the expected type of the resource represented by a resource
-	 *            interface
-	 * @return the resource if found or <code>null</code> otherwise
-	 * @since 2.0.0
-	 */
-	public Resource getResource(ExecutionContext context, String uri, Class resourceType);
-
-	public <T extends Resource> T makeResourceCopy(ExecutionContext context, String uri, int version,
-			Class<T> resourceType, String copyURI);
-
-	/**
-	 * Retrieves the data associated to a repository file resource.
-	 *
-	 * <p>
-	 * File resource references will be traversed until reaching the resource
-	 * which contains data.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param uri
-	 *            the path of the resource in the repository
-	 * @return a data container for the file resource
-	 * @throws JSResourceNotFoundException
-	 *             if a file resource is not found at the specified path
-	 * @see FileResource
-	 * @see FileResource#isReference()
-	 */
-	public FileResourceData getResourceData(ExecutionContext context, String uri) throws JSResourceNotFoundException;
-
-	/**
-	 * Retrieves the data associated to a repository content resource.
-	 * 
-	 * <p>
-	 * Data will be returned only for the top level content resource. If the
-	 * resource has subresources, separate calls will have to be made to fetch
-	 * the data for each subresource.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param uri
-	 *            the path of the resource in the repository
-	 * @return a data container for the content resource
-	 * @throws JSResourceNotFoundException
-	 *             if a file resource is not found at the specified path
-	 * @see ContentResource
-	 * @see ContentResource#getResources()
-	 */
-	public FileResourceData getContentResourceData(ExecutionContext context, String uri)
-			throws JSResourceNotFoundException;
-
-	/**
-	 * Returns the details of a repository folder.
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param uri
-	 *            the path of the folder in the repository
-	 * @return the folder details, or <code>null</code> if the folder was not
-	 *         found
-	 */
-	public Folder getFolder(ExecutionContext context, String uri);
-
-	/**
-	 * Creates a new folder or updates the details of an existing folder in the
-	 * repository.
-	 * 
-	 * <p>
-	 * If the folder object is marked as new, then a new folder is created in
-	 * the repository at the path specified by the object. Otherwise, the folder
-	 * is located in the repository and its details are updated according to the
-	 * folder object.
-	 * </p>
-	 * 
-	 * <p>
-	 * If the "IS_IMPORTING" parameter is set in the executionContext, then this
-	 * method sets the updateDate from the imported folder properties. If the
-	 * "IS_IMPORTING" is not set, then sets the update date to the current
-	 * state.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param folder
-	 *            the folder to create or update
-	 * @see Resource#isNew()
-	 */
-	public void saveFolder(ExecutionContext context, Folder folder);
-
-	/**
-	 * Lists all non-hidden folders in the repository.
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @return a list of {@link Folder} objects sorted by repository paths
-	 */
-	public List getAllFolders(ExecutionContext context);
-
-	public int getFoldersCount(String parentURI);
-
-	/**
-	 * Returns a list of all folders under a specific parent folders.
-	 *
-	 * <p>
-	 * The list returned by this method contains all visible folders that have
-	 * the specified folder as ancestor, including the specified folder itself.
-	 *
-	 * @param context
-	 *            the execution context
-	 * @param parentURI
-	 *            the URI of the parent folder
-	 * @return a list of {@link Folder} instances sorted by repository paths
-	 * @since 3.5.0
-	 */
-	public List getAllSubfolders(ExecutionContext context, String parentURI);
-
-	/**
-	 * Lists all direct subfolders of a repository folder.
-	 * 
-	 * <p>
-	 * Hidden folders are not included. If the parent folder is not found in the
-	 * repository, an empty list is returned.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param folderURI
-	 *            the path of the parent folder
-	 * @return a list of {@link Folder} instances sorted by names
-	 */
-	public List getSubFolders(ExecutionContext context, String folderURI);
-
-	/**
-	 * Determines if a folder exists at a specific path in the repository.
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param uri
-	 *            the path to look for in the repository
-	 * @return <code>true</code> if a folder with the specified path exists in
-	 *         the repository
-	 * @since 1.2.0
-	 * @see #repositoryPathExists(ExecutionContext, String)
-	 */
-	public boolean folderExists(ExecutionContext context, String uri);
-
-	/**
-	 * Checks whether a resource follows the rules imposed by the validator
-	 * configured for the specific resource type.
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param resource
-	 *            the resource to check
-	 * @param filter
-	 *            a filter that specifies a subset of errors that should be
-	 *            reported by the validator
-	 * @return a validation object which contains errors if any found
-	 * @since 2.1.0
-	 * @see ResourceValidator
-	 * @see ValidationErrors#isError()
-	 */
-	public ValidationErrors validateResource(ExecutionContext context, Resource resource, ValidationErrorFilter filter);
-
-	/**
-	 * Checks whether a folder follows the rules imposed by the validator
-	 * configured for folders.
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param folder
-	 *            the folder to check
-	 * @param filter
-	 *            a filter that specifies a subset of errors that should be
-	 *            reported by the validator
-	 * @return a validation object which contains errors if any found
-	 * @since 3.0.0
-	 * @see ValidationErrors#isError()
-	 */
-	public ValidationErrors validateFolder(ExecutionContext context, Folder folder, ValidationErrorFilter filter);
-
-	/**
-	 * Saves a new resource into the repository or updates an existing one.
-	 *
-	 * <p>
-	 * If the "IS_IMPORTING" parameter is set in the executionContext, then this
-	 * method sets a current creationDate to the resource and sets the
-	 * updateDate from the imported resource. If the "IS_OVERWRITING" parameter
-	 * is set, changes the creationDate and the updateDate to the current state.
-	 * </p>
-	 *
-	 * <p>
-	 * Calling this is the same as calling
-	 * {@link #saveResource(ExecutionContext, Resource, boolean)
-	 * saveResource(context, resource, false)}.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the execution context
-	 * @param resource
-	 *            the resource to be saved or updated
-	 */
-	public void saveResource(ExecutionContext context, Resource resource);
-
-	/**
-	 * Same as saveResource(ExecutionContext context, Resource resource); but
-	 * don't force flush Useful in cascade operations
-	 *
-	 * @since 5.0.1
-	 * @param context
-	 * @param resource
-	 */
-	public void saveResourceNoFlush(ExecutionContext context, Resource resource);
-
-	/**
-	 * Saves a new resource into the repository or updates an existing one.
-	 * 
-	 * <p>
-	 * If the resource object is marked as new, it will be created in the
-	 * repository by copying all the details from the resource object. If a
-	 * resource already exists at the path set in the resource object, the save
-	 * operation will fail.
-	 * </p>
-	 * 
-	 * <p>
-	 * If the resource is not marked as new, the repository will attempt locate
-	 * it at the path set in the resource object. If the resource is found in
-	 * the repository, its version numbers is compared with the version number
-	 * set in the resource object; if the version do not match the operation
-	 * will fail. If the versions match, the repository resource will be updated
-	 * with all the details passed in the resource object. All subresources will
-	 * be updated along with the top-level resource. Subresources present in the
-	 * repository resource but not in the updated resource obejct are deleted,
-	 * and newly added subresources are saved in the repository.
-	 * </p>
-	 * 
-	 * <p>
-	 * This method is identical to
-	 * {@link #saveResource(ExecutionContext, Resource)}, except that it allows
-	 * the caller to specify whether the resource creation date is to be updated
-	 * in the case when an existing resource is being updated.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the execution context
-	 * @param resource
-	 *            the resource to be saved or updated
-	 * @param updateCreationDate
-	 *            used to specify that when updating an existing resource, its
-	 *            creation date needs to be updated as well
-	 * 
-	 * @see Resource#isNew()
-	 * @see Resource#getVersion()
-	 * @see Resource#getCreationDate()
-	 * @since 3.5.0
-	 */
-	@Deprecated
-	public void saveResource(ExecutionContext context, Resource resource, boolean updateCreationDate);
-
-	/**
-	 * Deletes a resource from the repository.
-	 * 
-	 * <p>
-	 * If a resource is not found at the specified path, the operation will
-	 * result in an exception.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param uri
-	 *            the repository path of the resource to delete
-	 */
-	public void deleteResource(ExecutionContext context, String uri);
-
-	/**
-	 * Same as deleteResource(ExecutionContext context, String uri) but performs
-	 * no flush
-	 *
-	 * @since 5.0.1
-	 * @param context
-	 * @param uri
-	 */
-	public void deleteResourceNoFlush(ExecutionContext context, String uri);
-
-	/**
-	 * Deletes a folder from the repository.
-	 * 
-	 * <p>
-	 * If a folder is not found at the specified path, the operation will result
-	 * in an exception.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param uri
-	 *            the repository path of the folder to delete
-	 */
-	public void deleteFolder(ExecutionContext context, String uri);
-
-	/**
-	 * Deletes several resources and folders from the repository in a single
-	 * operation.
-	 * 
-	 * <p>
-	 * If any of the paths are not found in the repository, the operation will
-	 * result in an exception and all the changes will be rolled back.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param resourceURIs
-	 *            the repository paths of the resources to delete
-	 * @param folderURIs
-	 *            the repository paths of the folders to delete
-	 * @deprecated The spring method-based security configuration is incorrect
-	 *             for this method; you will get an exception if you call it.
-	 *             Use deleteFolder() or deleteResource() instead.
-	 */
-	public void delete(ExecutionContext context, String resourceURIs[], String folderURIs[]);
-
-	/**
-	 * Find resources that match a set of filter criteria.
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param criteria
-	 *            a filter used to search resources
-	 * @return array of found resources
-	 */
-	public ResourceLookup[] findResource(ExecutionContext context, FilterCriteria criteria);
-
-	/**
-	 * Find resources that match one of several filter criteria.
-	 * 
-	 * <p>
-	 * Resources are located for each of the filter criteria, and collected in a
-	 * single list.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param criteria
-	 *            array of filters used to search resources
-	 * @return array of found resources sorted by repository paths
-	 */
-	public ResourceLookup[] findResources(ExecutionContext context, FilterCriteria[] criteria);
-
-	/**
-	 * Find resources that match a set of filter criteria.
-	 * 
-	 * @param filterCriteria
-	 *            a filter used to search resources
-	 * @return a list of {@link ResourceLookup} objects sorted by repository
-	 *         paths
-	 */
-	public List loadResourcesList(final FilterCriteria filterCriteria);
-
-	/**
-	 * Find resources that match a set of filter criteria.
-	 *
-	 * @param context
-	 *            the caller execution context
-	 * @param filterCriteria
-	 *            a filter used to search resources
-	 * @return a list of {@link ResourceLookup} objects sorted by repository
-	 *         paths
-	 */
-	public List loadResourcesList(ExecutionContext context, FilterCriteria filterCriteria);
-
-	/**
-	 * Find resources that match one of several filter criteria.
-	 * 
-	 * <p>
-	 * Resources are located for each of the filter criteria, and collected in a
-	 * single list.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param filterCriteria
-	 *            array of filters used to search resources
-	 * @return a list of {@link ResourceLookup} objects sorted by repository
-	 *         paths
-	 * @since 2.0.0
-	 */
-	public List loadResourcesList(ExecutionContext context, FilterCriteria[] filterCriteria);
-
-	/**
-	 * Determines a count of resources per resource types.
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param text
-	 *            a text to search for in the resource labels and descriptions
-	 * @param resourceTypeList
-	 *            the types of resources to search for
-	 * @param filters
-	 *            list of filters to apply to the results
-	 * @param typeSpecificFilters
-	 *            filters per resource type to apply to the results
-	 * @param sorter
-	 *            specifies the sorting to apply to the results
-	 * @param transformerFactory
-	 *            a result transformer factory
-	 * @return a map containing count of resources that match the filters per
-	 *         resource types
-	 * @since 3.7.0
-	 */
-	public Map<Class, Integer> loadResourcesMapCount(ExecutionContext context, String text,
-			List<Class> resourceTypeList, List<SearchFilter> filters, Map<String, SearchFilter> typeSpecificFilters,
-			SearchSorter sorter, TransformerFactory transformerFactory);
-
-	/**
-	 * Lists resources by internal IDs.
-	 * 
-	 * @param idList
-	 *            the list of IDs of the resources to be listed
-	 * @return a list of {@link ResourceLookup} objects
-	 * @since 3.7.0
-	 */
-	public List<ResourceLookup> getResourcesByIdList(List<Long> idList);
-
-	/**
-	 * Returns internal IDs of resources that match specified filters.
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param text
-	 *            a text to search for in the resource labels and descriptions
-	 * @param type
-	 *            the type of resources to list
-	 * @param aClass
-	 *            the persistent resource type
-	 * @param filters
-	 *            list of filters to apply to the results
-	 * @param typeSpecificFilters
-	 *            filters per resource type to apply to the results
-	 * @param sorter
-	 *            specifies the sorting to apply to the results
-	 * @param transformerFactory
-	 *            a result transformer factory
-	 * @param firstResult
-	 *            the index of the first result to return
-	 * @param maxResult
-	 *            the maximum number of results to retrieve
-	 * @return a list of IDs of resources that match the filters
-	 * @since 3.7.0
-	 */
-	public List<Long> getResourcesIds(ExecutionContext context, String text, Class type, Class aClass,
-			List<SearchFilter> filters, Map<String, SearchFilter> typeSpecificFilters, SearchSorter sorter,
-			TransformerFactory transformerFactory, int firstResult, int maxResult);
-
-	/**
-	 * Lists resource details for a set of filter criteria.
-	 * 
-	 * @param filterCriteria
-	 *            the criteria to search the repository for
-	 * @return a list of resource detail objects sorted by repository paths
-	 */
-	public List loadClientResources(FilterCriteria filterCriteria);
-
-	/**
-	 * Instantiate an empty resource of a given type.
-	 * 
-	 * <p>
-	 * The resource type is an interface; the repository will use its
-	 * implementation class mapping to determine the actual type of the object
-	 * to instantiate.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param _class
-	 *            the type of resource to instantiate
-	 * @return an empty resource of the given type
-	 */
-	public Resource newResource(ExecutionContext context, Class _class);
-
-	/**
-	 * Determines the name of the hidden folder in which child resources of a
-	 * given resource will be located.
-	 * 
-	 * @param resourceName
-	 *            the name of the parent resource
-	 * @return the name of the resource children folder
-	 */
-	public String getChildrenFolderName(String resourceName);
-
-	/**
-	 * Determines if a resource of a specific type exists at a specific path in
-	 * the repository.
-	 * 
-	 * @param executionContext
-	 *            the caller execution context
-	 * @param uri
-	 *            the path to look for in the repository
-	 * @return <code>true</code> if a resource exists in the repository at the
-	 *         specified path
-	 * @see #resourceExists(ExecutionContext, String, Class)
-	 */
-	public boolean resourceExists(ExecutionContext executionContext, String uri);
-
-	/**
-	 * Determines if a resource of a specific type exists at a specific path in
-	 * the repository.
-	 * 
-	 * @param executionContext
-	 *            the caller execution context
-	 * @param uri
-	 *            the path to look for in the repository
-	 * @param resourceType
-	 *            the type of the resource to look for
-	 * @return <code>true</code> if a resource of the specified type exists in
-	 *         the repository at the specified path
-	 * @since 2.0.0
-	 */
-	public boolean resourceExists(ExecutionContext executionContext, String uri, Class resourceType);
-
-	/**
-	 * Determines if any resource that match a set of filter criteria exist in
-	 * the repository.
-	 * 
-	 * @param executionContext
-	 *            the caller execution context
-	 * @param filterCriteria
-	 *            the filter criteria
-	 * @return <code>true</code> if any resources match the filter criteria
-	 * @since 1.2.1
-	 */
-	public boolean resourceExists(ExecutionContext executionContext, FilterCriteria filterCriteria);
-
-	/**
-	 * Determines whether a resource or folder having a specified URI exists in
-	 * the repository.
-	 * 
-	 * <p>
-	 * Repository entities are uniquely identified by their URI. This method can
-	 * be used to check whether a URI is already present in the repository.
-	 * </p>
-	 * 
-	 * @param executionContext
-	 *            the execution context
-	 * @param uri
-	 *            the URI
-	 * @return <code>true</code> iff the URI is present in the repository
-	 * @since 2.1.0
-	 */
-	public boolean repositoryPathExists(ExecutionContext executionContext, String uri);
-
-	/**
-	 * Sets a given folder as hidden, so it won't appear in the results for any
-	 * repository operation.
-	 * 
-	 * @param uri
-	 *            the repository path of the folder
-	 * @since 2.1.0
-	 */
-	void hideFolder(String uri);
-
-	/**
-	 * Unset a given folder as hidden.
-	 * 
-	 * @param uri
-	 *            the repository path of the folder
-	 * @since 2.1.0
-	 * @see #hideFolder(String)
-	 */
-	void unhideFolder(String uri);
-
-	/**
-	 * Moves a folder to another location in the repository.
-	 * 
-	 * <p>
-	 * The name of the moved folder will be preserved. If the name already
-	 * exists under the destination folder, the operation will result in an
-	 * exception.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param sourceURI
-	 *            the path of the folder to move
-	 * @param destinationFolderURI
-	 *            the path of the folder under which the folder will be moved
-	 * @since 3.0.0
-	 */
-	void moveFolder(ExecutionContext context, String sourceURI, String destinationFolderURI);
-
-	/**
-	 * Moves a resource to another location in the repository.
-	 * 
-	 * <p>
-	 * The name of the moved resource will be preserved. If the name already
-	 * exists under the destination folder, the operation will result in an
-	 * exception.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param sourceURI
-	 *            the path of the resource to move
-	 * @param destinationFolderURI
-	 *            the path of the folder under which the resource will be moved
-	 * @since 3.0.0
-	 */
-	void moveResource(ExecutionContext context, String sourceURI, String destinationFolderURI);
-
-	/**
-	 * Copies a resource to a new location.
-	 * 
-	 * <p>
-	 * If the copy path already exists in the repository, a new name will be
-	 * automatically generated for the copied resource.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param sourceURI
-	 *            the path of the resource to copy
-	 * @param destinationURI
-	 *            the path at which to create the copy in the repository,
-	 *            including the resource copy name
-	 * @return the copied resource
-	 * @since 3.0.0
-	 */
-	Resource copyResource(ExecutionContext context, String sourceURI, String destinationURI);
-
-	/**
-	 * Copies a resource to a new location and change it's label.
-	 *
-	 * @param context
-	 *            the caller execution context
-	 * @param sourceURI
-	 *            the path of the resource to copy
-	 * @param destinationURI
-	 *            the path at which to create the copy in the repository,
-	 *            including the resource copy name
-	 * @param label
-	 *            the new label for copy. Nullable, no renaming happens if null.
-	 * @return the copied resource
-	 * @since 6.3.0
-	 */
-	Resource copyRenameResource(ExecutionContext context, String sourceURI, String destinationURI, String label);
-
-	/**
-	 * Copies a repository folder to a new location.
-	 * 
-	 * <p>
-	 * If the copy path already exists in the repository, a new name will be
-	 * automatically generated for the copied folder.
-	 * </p>
-	 * 
-	 * <p>
-	 * The subfolders and resources under the copied folder are copied
-	 * recursively. References between resources in the source folder are
-	 * translated to the resources in the new folder; references to resources
-	 * outside the source folder are preserved unchanged.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param sourceURI
-	 *            the path of the folder to copy
-	 * @param destinationURI
-	 *            the path at which to create the copy in the repository,
-	 *            including the folder copy name
-	 * @return the details of the folder copy
-	 * @since 3.0.0
-	 */
-	Folder copyFolder(ExecutionContext context, String sourceURI, String destinationURI);
-
-	/**
-	 * Copies a repository folder to a new location and change it's label..
-	 *
-	 * <p>
-	 * The subfolders and resources under the copied folder are copied
-	 * recursively. References between resources in the source folder are
-	 * translated to the resources in the new folder; references to resources
-	 * outside the source folder are preserved unchanged.
-	 * </p>
-	 *
-	 * @param context
-	 *            the caller execution context
-	 * @param sourceURI
-	 *            the path of the folder to copy
-	 * @param destinationURI
-	 *            the path at which to create the copy in the repository,
-	 *            including the folder copy name *
-	 * @param label
-	 *            the new label for copy. Nullable, no renaming happens if null.
-	 * @return the details of the folder copy
-	 * @since 6.3.0
-	 */
-	Folder copyRenameFolder(ExecutionContext context, String sourceURI, String destinationURI, String label);
-
-	/**
-	 * Copies several resources into a destination folder.
-	 * 
-	 * <p>
-	 * Names will be automatically assigned for the copied resources. If
-	 * possible, the names of the original resources will be preserved. If any
-	 * of the names already exists in the destination folder, a new name will be
-	 * automatically set for the resource copy.
-	 * </p>
-	 * 
-	 * @param context
-	 *            the caller execution context
-	 * @param resources
-	 *            the URIs of the resources to copy
-	 * @param destinationFolder
-	 *            the URI of the destination folder
-	 * @since 3.5.0
-	 */
-	void copyResources(ExecutionContext context, String[] resources, String destinationFolder);
-
-	List<ResourceLookup> getResources(ExecutionContext context, SearchCriteriaFactory searchCriteriaFactory,
-			List<SearchFilter> filters, SearchSorter sorter, TransformerFactory transformerFactory, int current,
-			int max);
-
-	int getResourcesCount(ExecutionContext context, SearchCriteriaFactory searchCriteriaFactory,
-			List<SearchFilter> filters, SearchSorter sorter, TransformerFactory transformerFactory);
-
-	/**
-	 * Looking for resources which depend on the specified resource. Current
-	 * implementation is looking for ReportUnits only.     *     * Note: Hidden
-	 * folders are excluded...
-	 *
-	 * @param context
-	 * @param uri
-	 * @param searchCriteriaFactory
-	 * @param current
-	 *            - page number (used for pagination)
-	 * @param max
-	 *            - resources per page or resources to be loaded id current is 0
-	 * @return
-	 */
-	List<ResourceLookup> getDependentResources(ExecutionContext context, String uri,
-			SearchCriteriaFactory searchCriteriaFactory, int current, int max);
-
-	/*
-	 * List<ResourceLookup> getDomainDependentResources(ExecutionContext
-	 * context, String uri, SearchCriteriaFactory searchCriteriaFactory, int
-	 * current, int max);
-	 */
-
-	/**
-	 * Transform resource lookup path to relative URIs
-	 * 
-	 * @param internalPath
-	 * @return external path
-	 */
-	String transformPathToExternal(String internalPath);
-
-	/**
-	 * run an HQL query and return either resource objects or lookups
-	 * 
-	 * @param context
-	 * @param asLookups
-	 * @param hqlQueryString
-	 * @return
-	 */
-	public abstract List<? extends Object> getResources(ExecutionContext context, boolean asLookups,
-			String hqlQueryString);
-}

+ 0 - 83
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/AncestorFolderFilter.java

@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * Filter that matches resources located under a specific folder at any level.
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: AncestorFolderFilter.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 3.5.0
- */
-@JasperServerAPI
-public class AncestorFolderFilter implements FilterElement {
-	
-	private String folderURI;
-	
-	/**
-	 * Creates an empty ancestor filter.
-	 * 
-	 * @see #setFolderURI(String)
-	 */
-	public AncestorFolderFilter() {
-	}
-	
-	/**
-	 * Creates an ancestor filter for a specific folder.
-	 * 
-	 * @param folderURI the repository path of the folder
-	 */
-	public AncestorFolderFilter(String folderURI) {
-		this.folderURI = folderURI;
-	}
-
-	/**
-	 * @see Filter#applyAncestorFolderFilter(AncestorFolderFilter)
-	 */
-	public void apply(Filter filter) {
-		filter.applyAncestorFolderFilter(this);
-	}
-
-	/**
-	 * Returns the repository path of the folder to use for this filter.
-	 * 
-	 * @return the repository path of the folder to filter on
-	 */
-	public String getFolderURI() {
-		return folderURI;
-	}
-
-	/**
-	 * Sets the folder whose child resources should be matched by this filter.
-	 * 
-	 * @param folderURI the repository path of the folder to filter on
-	 */
-	public void setFolderURI(String folderURI) {
-		this.folderURI = folderURI;
-	}
-
-	public FilterElement cloneFilterElement() {
-		return new AncestorFolderFilter(folderURI);
-	}
-
-}

+ 0 - 126
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/Filter.java

@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-import java.util.List;
-
-/**
- * Filter object that applies filter criteria in a the context where filtering
- * is performed.
- * 
- * <p>
- * A filter implementation acts as a bridge for the various filter criteria 
- * types.
- * It includes logic to translate the filter criteria to operation that
- * achieve the expected result filtering.
- * </p>
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @author Sherman Wood
- * @version $Id: Filter.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.0
- * @see FilterElement#apply(Filter)
- */
-@JasperServerAPI
-public interface Filter {
-	
-	/**
-	 * Applies a parent folder filter.
-	 * 
-	 * @param filter the filter to apply
-	 * @see ParentFolderFilter
-	 */
-	void applyParentFolderFilter(ParentFolderFilter filter);
-	
-	/**
-	 * Applies a property filter.
-	 * 
-	 * @param filter the filter to apply
-	 * @see PropertyFilter
-	 */
-	void applyPropertyFilter(PropertyFilter filter);
-	
-	/**
-	 * Applies a filter by negating the its criteria.
-	 * 
-	 * @param filter the filter to apply in negated form
-	 * @see NegatedFilterElement
-	 */
-	void applyNegatedFilter(FilterElement element);
-
-	/**
-	 * Applies a list of filters using logical conjunction/AND operation on the
-	 * filter criteria.
-	 * 
-	 * @param filterElements the list of filters
-	 * @see FilterElementConjunction 
-	 */
-	void applyConjunction(List filterElements);
-	
-	/**
-	 * Applies a list of filters using logical disjunction/OR operation on the
-	 * filter criteria.
-	 * 
-	 * @param filterElements the list of filters
-	 * @see FilterElementDisjunction 
-	 */
-	void applyDisjunction(List filterElements);
-	
-	/**
-	 * Applies two filters using a logical OR operation on the criteria.
-	 * 
-	 * @param lhs the first filter
-	 * @param rhs the second filter
-	 * @see FilterElementOr
-	 * @since 1.2.0
-	 */
-	void applyOr(FilterElement lhs, FilterElement rhs);
-	
-	/**
-	 * Applies a resource reference filter.
-	 * 
-	 * @param filter the filter to apply
-	 * @since 2.0.0
-	 * @see ReferenceFilter
-	 */
-	void applyReferenceFilter(ReferenceFilter filter);
-	
-	/**
-	 * Applies a resource URI filter.
-	 * 
-	 * @param filter the filter to apply
-	 * @since 2.0.0
-	 * @see URIFilter
-	 */
-	void applyURIFilter(URIFilter filter);
-	
-	/**
-	 * Applies an ancestor folder filter.
-	 * 
-	 * @param filter the filter to apply
-	 * @since 3.5.0
-	 * @see AncestorFolderFilter
-	 */
-	void applyAncestorFolderFilter(AncestorFolderFilter filter);
-
-}

+ 0 - 291
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterCriteria.java

@@ -1,291 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-
-/**
- * A set of criteria used to filter repository resources.
- * 
- * <p>
- * A filter consists of a set of filter elements, which are applied using
- * AND as logical operation, that is the filtered resources need to match
- * every filter element in the set.
- * </p>
- * 
- * <p>
- * A special filter attribute is the resource type.
- * A filter can be associated with a specific resource type, and it will only
- * match resources of that type.
- * If a resource type is not set, resources of any type will be matched.
- * </p>
- * 
- * @author Sherman Wood
- * @author Lucian Chirita
- * @version $Id: FilterCriteria.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.0
- * @see com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService#findResource(com.jaspersoft.jasperserver.api.common.domain.ExecutionContext, FilterCriteria)
- * @see FilterElementCollection#addFilterElement(FilterElement)
- */
-@JasperServerAPI
-public class FilterCriteria extends FilterElementCollection
-{
-	/**
-	 * Creates a parent folder filter for a specific folder.
-	 * 
-	 * @param folderURI the repository path of the parent folder
-	 * @return the created filter
-	 * @see FilterElementCollection#addFilterElement(FilterElement)
-	 */
-	public static ParentFolderFilter createParentFolderFilter(String folderURI) {
-		ParentFolderFilter filter = new ParentFolderFilter();
-		filter.setFolderURI(folderURI);
-		return filter;
-	}	
-
-	/**
-	 * Creates an ancestor filter for a specific folder.
-	 * 
-	 * @param folderURI the repository path of the folder
-	 * @return the created filter
-	 * @see FilterElementCollection#addFilterElement(FilterElement)
-	 * @since 3.5.0
-	 */
-	public static AncestorFolderFilter createAncestorFolderFilter(String folderURI) {
-		return new AncestorFolderFilter(folderURI);
-	}	
-
-	/**
-	 * Creates a filter that compares a resource field to a specified value.
-	 * 
-	 * @param property the name of the resource field
-	 * @param value the value to compare the field against
-	 * @return the created filter
-	 * @see FilterElementCollection#addFilterElement(FilterElement)
-	 * @see PropertyFilter#EQ
-	 */
-	public static PropertyFilter createPropertyEqualsFilter(String property, Object value) {
-		return createPropertyFilter(property, value, PropertyFilter.EQ);
-	}
-
-	/**
-	 * Creates a filter that matches a resource field to a given value using 
-	 * SQL LIKE semantics.
-	 * 
-	 * @param property the name of the resource field
-	 * @param value the value to compare the field against
-	 * @return the created filter
-	 * @see FilterElementCollection#addFilterElement(FilterElement)
-	 * @see PropertyFilter#LIKE
-	 */
-	public static PropertyFilter createPropertyLikeFilter(String property, Object value) {
-		return createPropertyFilter(property, value, PropertyFilter.LIKE);
-	}
-
-    public static PropertyFilter createPropertyInFilter(String property, Object[] values) {
-        return createPropertyFilter(property, values, PropertyFilter.IN);
-    }
-
-	/**
-	 * Creates a filter that compares a resource field to be greater than the 
-	 * given value.
-	 * 
-	 * @param property the name of the resource field
-	 * @param value the value to compare the field against
-	 * @return the created filter
-	 * @see FilterElementCollection#addFilterElement(FilterElement)
-	 * @see PropertyFilter#GT
-	 */
-	public static PropertyFilter createPropertyGreaterThanFilter(String property, Object value) {
-		return createPropertyFilter(property, value, PropertyFilter.GT);
-	}
-
-	/**
-	 * Creates a filter that compares a resource field to be less than the 
-	 * given value.
-	 * 
-	 * @param property the name of the resource field
-	 * @param value the value to compare the field against
-	 * @return the created filter
-	 * @see FilterElementCollection#addFilterElement(FilterElement)
-	 * @see PropertyFilter#LT
-	 */
-	public static PropertyFilter createPropertyLessThanFilter(String property, Object value) {
-		return createPropertyFilter(property, value, PropertyFilter.LT);
-	}
-
-	/**
-	 * Creates a filter that checks a resource field to be between the low and 
-	 * high values.
-	 * 
-	 * @param property the name of the resource field
-	 * @param loValue the low value
-	 * @param hiValue the high value
-	 * @return the created filter
-	 * @see FilterElementCollection#addFilterElement(FilterElement)
-	 * @see PropertyFilter#BETWEEN
-	 */
-	public static PropertyFilter createPropertyBetweenFilter(String property, Object loValue, Object hiValue) {
-		return createPropertyFilter(property, loValue, hiValue, PropertyFilter.BETWEEN);
-	}
-	
-	protected static PropertyFilter createPropertyFilter(String property, Object value, byte op) {
-		PropertyFilter filter = new PropertyFilter();
-		filter.setOp(op);
-		filter.setProperty(property);
-		filter.setValue(value);
-		return filter;
-	}
-
-	protected static PropertyFilter createPropertyFilter(String property, Object loValue, Object hiValue, byte op) {
-		PropertyFilter filter = new PropertyFilter();
-		filter.setOp(op);
-		filter.setProperty(property);
-		filter.setLowValue(loValue);
-		filter.setHighValue(hiValue);
-		return filter;
-	}
-
-    protected static PropertyFilter createPropertyFilter(String property, Object[] values, byte op) {
-        PropertyFilter filter = new PropertyFilter();
-        filter.setOp(op);
-        filter.setProperty(property);
-        filter.setValues(values);
-        return filter;
-    }
-
-    /**
-	 * Creates a resource reference filter.
-	 * 
-	 * @param property the name of the reference field on which to filter resources
-	 * @param referenceType the type of the referenced resource
-	 * @param referredURI the repository path of the referenced resource
-	 * @return the created filter
-	 * @see FilterElementCollection#addFilterElement(FilterElement)
-	 * @since 2.0.0
-	 */
-	public static ReferenceFilter createReferenceFilter(String property, Class referenceType, String referredURI) {
-		ReferenceFilter filter = new ReferenceFilter();
-		filter.setProperty(property);
-		filter.setReferenceClass(referenceType);
-		filter.setReferredURI(referredURI);
-		return filter;
-	}
-	
-	/**
-	 * Creates a filter that matches a single resource based on its repository
-	 * path.
-	 * 
-	 * @param uri the repository path of the resource to find
-	 * @return the created filter
-	 * @see FilterElementCollection#addFilterElement(FilterElement)
-	 * @since 2.0.0
-	 */
-	public static URIFilter createResourceURIFilter(String uri) {
-		URIFilter filter = new URIFilter();
-		filter.setURI(uri);
-		return filter;
-	}	
-	
-	private Class _class;
-
-	/**
-	 * Creates an empty filter.
-	 * 
-	 * <p>
-	 * The criteria is not associated with a resource type.
-	 * </p>
-	 * 
-	 * @return the created filter
-	 */
-	public static FilterCriteria createFilter() {
-		return new FilterCriteria();
-	}
-
-	/**
-	 * Creates an empty filter for a specific resource type.
-	 * 
-	 * @param _class the resource type defined as the resource interface
-	 * @return the created filter
-	 */
-	public static FilterCriteria createFilter(Class _class) {
-		return new FilterCriteria(_class);
-	}
-	
-	/**
-	 * Creates an empty filter.
-	 * 
-	 * <p>
-	 * The criteria is not associated with a resource type.
-	 * </p>
-	 */
-	public FilterCriteria () {
-		this(null);
-	}
-	
-	/**
-	 * Creates an empty filter for a specific resource type.
-	 * 
-	 * @param _class the resource type defined as the resource interface
-	 */
-	public FilterCriteria (Class _class) {
-		super();
-		this._class = _class;
-	}
-
-	/**
-	 * Returns the resource type for which this filter has been created,
-	 * or <code>null</code> if the filter is not associated to a particular
-	 * resource type.
-	 * 
-	 * @return the resource type of this filter, if set
-	 */
-	public Class getFilterClass() {
-		return _class;
-	}
-
-	/**
-	 * Associates this filter with a resource type.
-	 * 
-	 * <p>
-	 * The filter will only match resources of the specified type.
-	 * </p>
-	 * 
-	 * @param _class the resource type defined as the resource interface
-	 */
-	public void setFilterClass(Class _class) {
-		this._class = _class;
-	}
-	
-	/**
-	 * Clones a filter by cloning each of the filter elements that it contains.
-	 * 
-	 * @return a deep clone of the filter
-	 * @since 3.5.0
-	 * @see FilterElementCollection#getFilterElements()
-	 */
-	public FilterCriteria cloneFilter() {
-		FilterCriteria clone = new FilterCriteria(_class);
-		clone.addClonedElements(getFilterElements());
-		return clone;
-	}
-}

+ 0 - 54
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterElement.java

@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-
-/**
- * Filter criterion interface.
- * 
- * @author Sherman Wood
- * @author Lucian Chirita
- * @version $Id: FilterElement.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.0
- * @see FilterElementCollection
- */
-@JasperServerAPI
-public interface FilterElement {
-
-	/**
-	 * Applies this criterion in a filter implementation.
-	 * 
-	 * @param filter the filter implementation
-	 * @see Filter
-	 */
-	void apply(Filter filter);
-	
-	/**
-	 * Creates a clone of the filter criterion.
-	 * 
-	 * @return a clone of this filter
-	 * @since 3.5.0
-	 */
-	FilterElement cloneFilterElement();
-	
-}

+ 0 - 139
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterElementCollection.java

@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * Base class for filter criteria object that are composed of filter elements 
- * lists. 
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @author Sherman Wood
- * @version $Id: FilterElementCollection.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.0
- */
-@JasperServerAPI
-public abstract class FilterElementCollection {
-	private final List criteria;
-	
-	protected FilterElementCollection() {
-		criteria = new ArrayList();
-	}
-	
-	/**
-	 * Returns the list of filter elements that make up this criteria.
-	 * 
-	 * @return a list of {@link FilterElement}
-	 */
-	public List getFilterElements() {
-		return criteria;
-	}
-	
-	/**
-	 * Adds a filter element to the list of criteria.
-	 * 
-	 * @param element the element to add
-	 */
-	public void addFilterElement(FilterElement element) {
-		criteria.add(element);
-	}
-
-	/**
-	 * Adds a filter element in negated form to the list of criteria.
-	 * 
-	 * @param element the element to add in negated form
-	 * @see NegatedFilterElement
-	 */
-	public void addNegatedFilterElement(FilterElement element) {
-		NegatedFilterElement negated = new NegatedFilterElement();
-		negated.setElement(element);
-		criteria.add(negated);
-	}
-	
-	/**
-	 * Creates an empty conjunction of filter criteria and adds it as an filter 
-	 * element to the list of criteria wrapped by this object.
-	 * 
-	 * <p>
-	 * The filter conjunction is returned and filter elements should be added 
-	 * to it.
-	 * </p>
-	 * 
-	 * @return the empty filter conjunction that was created
-	 * @see FilterElementConjunction 
-	 */
-	public FilterElementConjunction addConjunction() {
-		FilterElementConjunction conjunction = new FilterElementConjunction();
-		addFilterElement(conjunction);
-		return conjunction;
-	}
-	
-	/**
-	 * Creates an empty disjunction of filter criteria and adds it as an filter 
-	 * element to the list of criteria wrapped by this object.
-	 * 
-	 * <p>
-	 * The filter disjunction is returned and filter elements should be added 
-	 * to it.
-	 * </p>
-	 * 
-	 * @return the empty filter disjunction that was created 
-	 * @see FilterElementDisjunction 
-	 */
-	public FilterElementDisjunction addDisjunction() {
-		FilterElementDisjunction disjunction = new FilterElementDisjunction();
-		addFilterElement(disjunction);
-		return disjunction;
-	}
-	
-	/**
-	 * Creates an empty disjunction of two filter criteria and adds it as a
-	 * filter element to the list of criteria wrapped by this object.
-	 * 
-	 * <p>
-	 * The filter disjunction is returned and the two filter elements should be
-	 * set to it.
-	 * </p>
-	 * 
-	 * @return the empty filter disjunction that was created
-	 * @see FilterElementOr#setLeftHandSide(FilterElement)
-	 * @see FilterElementOr#setRightHandSide(FilterElement)
-	 * @since 1.2.0
-	 */
-	public FilterElementOr addOr() {
-		FilterElementOr or = new FilterElementOr();
-		addFilterElement(or);
-		return or;
-	}
-	
-	protected void addClonedElements(List filterElements) {
-		for (Iterator it = filterElements.iterator(); it.hasNext();) {
-			FilterElement element = (FilterElement) it.next();
-			FilterElement elementClone = element.cloneFilterElement();
-			addFilterElement(elementClone);
-		}
-	}
-}

+ 0 - 67
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterElementConjunction.java

@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * A conjunction of two or more filter elements.
- * 
- * <p>
- * The composing filter elements will be applied using AND as logical operation.
- * </p>
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: FilterElementConjunction.java 47331 2014-07-18 09:13:06Z kklein
- *          $
- * @since 1.0
- */
-@JasperServerAPI
-public class FilterElementConjunction extends FilterElementCollection implements FilterElement {
-
-	/**
-	 * Creates an empty element conjunction.
-	 * 
-	 * @see FilterElementCollection#addFilterElement(FilterElement)
-	 */
-	public FilterElementConjunction() {
-		super();
-	}
-
-	/**
-	 * @see Filter#applyConjunction(java.util.List)
-	 */
-	public void apply(Filter filter) {
-		filter.applyConjunction(getFilterElements());
-	}
-
-	/**
-	 * Performs a deep clone of the filter elements that compose this
-	 * conjunction.
-	 * 
-	 * @since 3.5.0
-	 */
-	public FilterElement cloneFilterElement() {
-		FilterElementConjunction clone = new FilterElementConjunction();
-		clone.addClonedElements(getFilterElements());
-		return clone;
-	}
-}

+ 0 - 67
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterElementDisjunction.java

@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * A disjunction of two or more filter elements.
- * 
- * <p>
- * The composing filter elements will be applied using OR as logical operation.
- * </p>
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: FilterElementDisjunction.java 47331 2014-07-18 09:13:06Z kklein
- *          $
- * @since 1.0
- */
-@JasperServerAPI
-public class FilterElementDisjunction extends FilterElementCollection implements FilterElement {
-
-	/**
-	 * Creates an empty element disjunction.
-	 * 
-	 * @see FilterElementCollection#addFilterElement(FilterElement)
-	 */
-	public FilterElementDisjunction() {
-		super();
-	}
-
-	/**
-	 * @see Filter#applyDisjunction(java.util.List)
-	 */
-	public void apply(Filter filter) {
-		filter.applyDisjunction(getFilterElements());
-	}
-
-	/**
-	 * Performs a deep clone of the filter elements that compose this
-	 * disjunction.
-	 * 
-	 * @since 3.5.0
-	 */
-	public FilterElement cloneFilterElement() {
-		FilterElementDisjunction clone = new FilterElementDisjunction();
-		clone.addClonedElements(getFilterElements());
-		return clone;
-	}
-}

+ 0 - 121
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/FilterElementOr.java

@@ -1,121 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * A disjunction of two filter elements that are applied using OR as logical
- * operation.
- * 
- * @author swood
- * @version $Id: FilterElementOr.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.2.0
- * @see FilterElementDisjunction
- */
-@JasperServerAPI
-public class FilterElementOr implements FilterElement {
-
-	private FilterElement leftHandSide;
-	private FilterElement rightHandSide;
-
-	/**
-	 * Creates an empty disjunction.
-	 * 
-	 * @see #setLeftHandSide(FilterElement)
-	 * @see #setRightHandSide(FilterElement)
-	 */
-	public FilterElementOr() {
-		super();
-	}
-
-	/**
-	 * Creates a disjunction of two filter elements.
-	 * 
-	 * @param leftHandSide
-	 *            the first filter element
-	 * @param rightHandSide
-	 *            the second filter element
-	 */
-	public FilterElementOr(FilterElement leftHandSide, FilterElement rightHandSide) {
-		super();
-
-		this.leftHandSide = leftHandSide;
-		this.rightHandSide = rightHandSide;
-	}
-
-	/**
-	 * @see Filter#applyOr(FilterElement, FilterElement)
-	 */
-	public void apply(Filter filter) {
-		filter.applyOr(getLeftHandSide(), getRightHandSide());
-
-	}
-
-	/**
-	 * Returns the first element in the disjunction.
-	 * 
-	 * @return the first element in the disjunction
-	 */
-	public FilterElement getLeftHandSide() {
-		return leftHandSide;
-	}
-
-	/**
-	 * Sets the first element in the disjunction.
-	 * 
-	 * @param leftHandSide
-	 *            the first element in the disjunction
-	 */
-	public void setLeftHandSide(FilterElement leftHandSide) {
-		this.leftHandSide = leftHandSide;
-	}
-
-	/**
-	 * Returns the second element in the disjunction.
-	 * 
-	 * @return the second element in the disjunction
-	 */
-	public FilterElement getRightHandSide() {
-		return rightHandSide;
-	}
-
-	/**
-	 * Sets the second element in the disjunction.
-	 * 
-	 * @param rightHandSide
-	 *            the second element in the disjunction
-	 */
-	public void setRightHandSide(FilterElement rightHandSide) {
-		this.rightHandSide = rightHandSide;
-	}
-
-	/**
-	 * Clones the two filter elements in the disjunction.
-	 * 
-	 * @since 3.5.0
-	 */
-	public FilterElement cloneFilterElement() {
-		return new FilterElementOr(leftHandSide.cloneFilterElement(), rightHandSide.cloneFilterElement());
-	}
-
-}

+ 0 - 90
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/NegatedFilterElement.java

@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * Wraps a filter element to apply it in negated form.
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: NegatedFilterElement.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.0
- */
-@JasperServerAPI
-public class NegatedFilterElement implements FilterElement {
-
-	private FilterElement element;
-
-	/**
-	 * Creates an empty negated filter.
-	 * 
-	 * @see #setElement(FilterElement)
-	 */
-	public NegatedFilterElement() {
-	}
-
-	/**
-	 * Wraps a filter element to apply it in negate form.
-	 * 
-	 * @param element
-	 *            the element to wrap
-	 */
-	public NegatedFilterElement(FilterElement element) {
-		this.element = element;
-	}
-
-	/**
-	 * Returns the filter element which will be applied in negated form.
-	 * 
-	 * @return the wrapped the filter element
-	 */
-	public FilterElement getElement() {
-		return element;
-	}
-
-	/**
-	 * Sets the filter element which is to be applied in negated form.
-	 * 
-	 * @param element
-	 *            the filter element to be negated
-	 */
-	public void setElement(FilterElement element) {
-		this.element = element;
-	}
-
-	/**
-	 * @see Filter#applyNegatedFilter(FilterElement)
-	 */
-	public void apply(Filter filter) {
-		filter.applyNegatedFilter(getElement());
-	}
-
-	/**
-	 * Clones the wrapped filter element.
-	 * 
-	 * @since 3.5.0
-	 */
-	public FilterElement cloneFilterElement() {
-		return new NegatedFilterElement(element.cloneFilterElement());
-	}
-
-}

+ 0 - 89
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/ParentFolderFilter.java

@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * Filter criteria which matches resources that are direct children of a
- * specific repository folder.
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: ParentFolderFilter.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.0
- */
-@JasperServerAPI
-public class ParentFolderFilter implements FilterElement {
-
-	private String folderURI;
-
-	/**
-	 * Creates an empty filter.
-	 * 
-	 * @see #setFolderURI(String)
-	 */
-	public ParentFolderFilter() {
-	}
-
-	/**
-	 * Creates a filter for a specific parent folder.
-	 * 
-	 * @param folderURI
-	 *            the repository path of the parent folder
-	 */
-	public ParentFolderFilter(String folderURI) {
-		this.folderURI = folderURI;
-	}
-
-	/**
-	 * @see Filter#applyParentFolderFilter(ParentFolderFilter)
-	 */
-	public void apply(Filter filter) {
-		filter.applyParentFolderFilter(this);
-	}
-
-	/**
-	 * Returns the repository path of the parent folder used by this filter.
-	 * 
-	 * @return the parent folder used by this filter
-	 */
-	public String getFolderURI() {
-		return folderURI;
-	}
-
-	/**
-	 * Sets the folder whose child resources are to be matched by this filter.
-	 * 
-	 * @param folderURI
-	 *            the repository path of the folder
-	 */
-	public void setFolderURI(String folderURI) {
-		this.folderURI = folderURI;
-	}
-
-	/**
-	 * @since 3.5.0
-	 */
-	public FilterElement cloneFilterElement() {
-		return new ParentFolderFilter(folderURI);
-	}
-
-}

+ 0 - 242
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/PropertyFilter.java

@@ -1,242 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-import com.uas.report.jasperserver.api.JSExceptionWrapper;
-
-/**
- * Filter that applies an operation to a resource field against a given value.
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: PropertyFilter.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 1.0
- */
-@JasperServerAPI
-public class PropertyFilter implements FilterElement, Cloneable {
-
-	/**
-	 * Operation that compares the field to the given value.
-	 * 
-	 * @see #getOp()
-	 */
-	public static final byte EQ = 0;
-
-	/**
-	 * Operation that matches the field to the given value using SQL LIKE
-	 * semantics.
-	 * 
-	 * @see #getOp()
-	 */
-	public static final byte LIKE = 1;
-
-	/**
-	 * Operation that compares the field to be greater than the given value.
-	 * 
-	 * @see #getOp()
-	 */
-	public static final byte GT = 2;
-
-	/**
-	 * Operation that compares the field to be less than the given value.
-	 * 
-	 * @see #getOp()
-	 */
-	public static final byte LT = 3;
-
-	/**
-	 * Operation that checks the field to be between the low and high values.
-	 * 
-	 * @see #getOp()
-	 * @see #getLowValue()
-	 * @see #getHighValue()
-	 */
-	public static final byte BETWEEN = 4;
-
-	/**
-	 * Operation that checks if the property value is in the list
-	 *
-	 * @see #getOp()
-	 */
-	public static final byte IN = 5;
-
-	private String property;
-	private Object value;
-	private Object value1;
-	private Object[] values;
-	private byte op;
-
-	/**
-	 * Creates an empty property filter.
-	 */
-	public PropertyFilter() {
-	}
-
-	/**
-	 * @see Filter#applyPropertyFilter(PropertyFilter)
-	 */
-	public void apply(Filter filter) {
-		filter.applyPropertyFilter(this);
-	}
-
-	/**
-	 * Returns the operation that will be used to match the resource field
-	 * against the value(s).
-	 * 
-	 * @return one of the supported operations
-	 * @see #EQ
-	 * @see #LIKE
-	 * @see #GT
-	 * @see #LT
-	 * @see #BETWEEN
-	 */
-	public byte getOp() {
-		return op;
-	}
-
-	/**
-	 * Sets the operation used to match the resource field against the provided
-	 * value(s).
-	 * 
-	 * @param op
-	 *            one of the supported operations
-	 * @see #EQ
-	 * @see #LIKE
-	 * @see #GT
-	 * @see #LT
-	 * @see #BETWEEN
-	 */
-	public void setOp(byte op) {
-		this.op = op;
-	}
-
-	/**
-	 * Returns the name of the resource field that will be matched by this
-	 * filter.
-	 * 
-	 * @return the resource field name
-	 */
-	public String getProperty() {
-		return property;
-	}
-
-	/**
-	 * Sets the resource field that will be used to by this filter to match
-	 * resources.
-	 * 
-	 * @param property
-	 *            the resource field name
-	 */
-	public void setProperty(String property) {
-		this.property = property;
-	}
-
-	/**
-	 * Returns the value used to match against the resource field.
-	 * 
-	 * @return the value to use for the filter
-	 */
-	public Object getValue() {
-		return value;
-	}
-
-	/**
-	 * Sets the value to be matched against the resource field.
-	 * 
-	 * @param value
-	 *            the value used by this filter
-	 */
-	public void setValue(Object value) {
-		this.value = value;
-	}
-
-	/**
-	 * Returns the low value used for a BETWEEN condition.
-	 * 
-	 * @return the low value for a BETWEEN condition
-	 * @see #BETWEEN
-	 */
-	public Object getLowValue() {
-		return value;
-	}
-
-	/**
-	 * Sets the low value used for a BETWEEN condition.
-	 * 
-	 * @param loValue
-	 *            the low value for a BETWEEN condition
-	 * @see #BETWEEN
-	 */
-	public void setLowValue(Object loValue) {
-		this.value = loValue;
-	}
-
-	/**
-	 * Returns the high value used for a BETWEEN condition.
-	 * 
-	 * @return the high value for a BETWEEN condition
-	 * @see #BETWEEN
-	 */
-	public Object getHighValue() {
-		return value1;
-	}
-
-	/**
-	 * Sets the high value used for a BETWEEN condition.
-	 * 
-	 * @param hiValue
-	 *            the high value for a BETWEEN condition
-	 * @see #BETWEEN
-	 */
-	public void setHighValue(Object hiValue) {
-		this.value1 = hiValue;
-	}
-
-	/**
-	 * Gets the list of values for IN condition
-	 * 
-	 * @return
-	 */
-	public Object[] getValues() {
-		return values;
-	}
-
-	/**
-	 * Sets the list of values for IN condition
-	 * 
-	 * @param values
-	 */
-	public void setValues(Object[] values) {
-		this.values = values;
-	}
-
-	/**
-	 * @since 3.5.0
-	 */
-	public FilterElement cloneFilterElement() {
-		try {
-			return (FilterElement) clone();
-		} catch (CloneNotSupportedException e) {
-			// never
-			throw new JSExceptionWrapper(e);
-		}
-	}
-}

+ 0 - 133
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/ReferenceFilter.java

@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * Filter which matches resources that reference other specified resource.
- * 
- * <p>
- * The filter is applied by locating the specified resource, and filtering
- * the results to include resources that reference via a given field the
- * located resource.
- * For instance, one could filter report units that reference a particular
- * data source resource.
- * </p>
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: ReferenceFilter.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 2.0.0
- */
-@JasperServerAPI
-public class ReferenceFilter implements FilterElement {
-
-	private String property;
-	private Class referenceClass;
-	private String referredURI;
-	
-	/**
-	 * Creates an empty reference filter.
-	 */
-	public ReferenceFilter() {
-	}
-	
-	/**
-	 * Creates a reference filter.
-	 * 
-	 * @param property the name of the reference field on which to filter resources
-	 * @param referenceClass the type of the referenced resource
-	 * @param referredURI the repository path of the referenced resource
-	 */
-	public ReferenceFilter(String property, Class referenceClass, String referredURI) {
-		this.property = property;
-		this.referenceClass = referenceClass;
-		this.referredURI = referredURI;
-	}
-
-	/**
-	 * @see Filter#applyReferenceFilter(ReferenceFilter)
-	 */
-	public void apply(Filter filter) {
-		filter.applyReferenceFilter(this);
-	}
-
-	/**
-	 * Returns the name of the reference field on which to filter resources.
-	 * 
-	 * @return the name of the reference field
-	 */
-	public String getProperty() {
-		return property;
-	}
-
-	/**
-	 * Sets the reference field on which to filter resources.
-	 * 
-	 * @param property the name of the reference field
-	 */
-	public void setProperty(String property) {
-		this.property = property;
-	}
-
-	/**
-	 * Returns the repository path of the referenced resource.
-	 * 
-	 * @return the path of the referenced resource
-	 */
-	public String getReferredURI() {
-		return referredURI;
-	}
-
-	/**
-	 * Sets the path of the resource to use as reference filter.
-	 * 
-	 * @param referredURI the path of the referenced resource
-	 */
-	public void setReferredURI(String referredURI) {
-		this.referredURI = referredURI;
-	}
-
-	/**
-	 * Returns the type of the referenced resource.
-	 * 
-	 * @return the type of the referenced resource
-	 */
-	public Class getReferenceClass() {
-		return referenceClass;
-	}
-
-	/**
-	 * Sets the type of the resource to use as reference filter.
-	 * 
-	 * @param referenceClass the type of the referenced resource
-	 */
-	public void setReferenceClass(Class referenceClass) {
-		this.referenceClass = referenceClass;
-	}
-
-	/**
-	 * @since 3.5.0
-	 */
-	public FilterElement cloneFilterElement() {
-		return new ReferenceFilter(property, referenceClass, referredURI);
-	}
-}

+ 0 - 86
src/main/java/com/uas/report/jasperserver/api/metadata/view/domain/URIFilter.java

@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.metadata.view.domain;
-
-import com.uas.report.jasperserver.api.JasperServerAPI;
-
-/**
- * Filter that matches a single resource based on its repository path/URI.
- * 
- * @author Lucian Chirita (lucianc@users.sourceforge.net)
- * @version $Id: URIFilter.java 47331 2014-07-18 09:13:06Z kklein $
- * @since 2.0.0
- */
-@JasperServerAPI
-public class URIFilter implements FilterElement {
-	
-	private String uri;
-	
-	/**
-	 * Creates an empty URI filter.
-	 * 
-	 * @see #setURI(String)
-	 */
-	public URIFilter() {
-	}
-	
-	/**
-	 * Creates a URI filter for a specific resource.
-	 * 
-	 * @param uri the repository path of the resource to find
-	 */
-	public URIFilter(String uri) {
-		this.uri = uri;
-	}
-
-	/**
-	 * @see Filter#applyURIFilter(URIFilter)
-	 */
-	public void apply(Filter filter) {
-		filter.applyURIFilter(this);
-	}
-
-	/**
-	 * Returns the repository path of the resource to find.
-	 * 
-	 * @return the repository path of the resource to find
-	 */
-	public String getURI() {
-		return uri;
-	}
-
-	/**
-	 * Sets the repository path of the resource that this filter will match.
-	 * 
-	 * @param uri the repository path of the resource to find
-	 */
-	public void setURI(String uri) {
-		this.uri = uri;
-	}
-
-	/**
-	 * @since 3.5.0
-	 */
-	public FilterElement cloneFilterElement() {
-		return new URIFilter(uri);
-	}
-
-}

+ 0 - 34
src/main/java/com/uas/report/jasperserver/api/search/QueryModificationEvaluator.java

@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.uas.report.jasperserver.api.search;
-
-import com.uas.report.jasperserver.api.common.domain.ExecutionContext;
-
-/**
- * User: carbiv Date: 6/4/12 Time: 3:56 PM to help decide if and how to update
- * the hibernate query.
- */
-public interface QueryModificationEvaluator {
-	public static final String FORCE_REPO_RESOURCE = "forceRepoResource";
-
-	public boolean useFullResource(ExecutionContext context);
-
-}

+ 0 - 32
src/main/java/com/uas/report/jasperserver/api/search/ResultTransformer.java

@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.uas.report.jasperserver.api.search;
-
-import java.util.List;
-
-/**
- */
-public interface ResultTransformer {
-	public List<Long> transformToIdList(List resultList);
-
-	public Integer transformToCount(List resultList);
-}

+ 0 - 241
src/main/java/com/uas/report/jasperserver/api/search/SearchCriteria.java

@@ -1,241 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.uas.report.jasperserver.api.search;
-
-import java.util.Iterator;
-
-import org.hibernate.Criteria;
-import org.hibernate.FetchMode;
-import org.hibernate.HibernateException;
-import org.hibernate.LockMode;
-import org.hibernate.Session;
-import org.hibernate.criterion.Criterion;
-import org.hibernate.criterion.DetachedCriteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Projection;
-import org.hibernate.criterion.ProjectionList;
-import org.hibernate.criterion.Projections;
-import org.hibernate.engine.SessionImplementor;
-import org.hibernate.impl.CriteriaImpl;
-import org.hibernate.transform.ResultTransformer;
-
-/**
- * Search criteria.
- *
- * @author Stas Chubar
- */
-public class SearchCriteria extends DetachedCriteria {
-
-	private final CriteriaImpl impl;
-	private final Criteria criteria;
-
-	protected SearchCriteria(String entityName) {
-		super(entityName);
-		impl = new CriteriaImpl(entityName, null);
-		criteria = impl;
-	}
-
-	protected SearchCriteria(String entityName, String alias) {
-		super(entityName, alias);
-		impl = new CriteriaImpl(entityName, alias, null);
-		criteria = impl;
-	}
-
-	protected SearchCriteria(CriteriaImpl impl, Criteria criteria) {
-		super(impl, criteria);
-		this.impl = impl;
-		this.criteria = criteria;
-	}
-
-	/**
-	 * Get an executable instance of <literal>Criteria</literal>, to actually
-	 * run the query.
-	 */
-	public Criteria getExecutableCriteria(Session session) {
-		impl.setSession((SessionImplementor) session);
-		return impl;
-	}
-
-	public static SearchCriteria forEntityName(String entityName) {
-		return new SearchCriteria(entityName);
-	}
-
-	public static SearchCriteria forEntityName(String entityName, String alias) {
-		return new SearchCriteria(entityName, alias);
-	}
-
-	public static SearchCriteria forClass(Class clazz) {
-		return new SearchCriteria(clazz.getName());
-	}
-
-	public static SearchCriteria forClass(Class clazz, String alias) {
-		return new SearchCriteria(clazz.getName(), alias);
-	}
-
-	public SearchCriteria add(Criterion criterion) {
-		criteria.add(criterion);
-		return this;
-	}
-
-	public SearchCriteria addOrder(Order order) {
-		criteria.addOrder(order);
-		return this;
-	}
-
-	public SearchCriteria createAlias(String associationPath, String alias) throws HibernateException {
-		criteria.createAlias(associationPath, alias);
-		return this;
-	}
-
-	public SearchCriteria createCriteria(String associationPath, String alias) throws HibernateException {
-		return new SearchCriteria(impl, criteria.createCriteria(associationPath, alias));
-	}
-
-	public SearchCriteria createCriteria(String associationPath) throws HibernateException {
-		return new SearchCriteria(impl, criteria.createCriteria(associationPath));
-	}
-
-	public String getAlias() {
-		return criteria.getAlias();
-	}
-
-	public SearchCriteria setFetchMode(String associationPath, FetchMode mode) throws HibernateException {
-		criteria.setFetchMode(associationPath, mode);
-		return this;
-	}
-
-	public SearchCriteria setProjection(Projection projection) {
-		criteria.setProjection(projection);
-		return this;
-	}
-
-	public SearchCriteria addProjection(Projection projection) {
-		Projection oldProjection = ((CriteriaImpl) criteria).getProjection();
-
-		if (projection == null || oldProjection == null) {
-			criteria.setProjection(projection);
-			return this;
-		}
-
-		if (oldProjection instanceof ProjectionList) {
-			addProjectionToList(((ProjectionList) oldProjection), projection);
-		} else {
-			ProjectionList list = Projections.projectionList().add(oldProjection);
-			criteria.setProjection(addProjectionToList(list, projection));
-		}
-
-		return this;
-	}
-
-	private Projection addProjectionToList(ProjectionList projectionList, Projection newProjection) {
-		if (newProjection instanceof ProjectionList) {
-			ProjectionList newProjectionList = ((ProjectionList) newProjection);
-
-			for (int i = 0; i < newProjectionList.getLength(); i++) {
-				projectionList.add(newProjectionList.getProjection(i));
-			}
-		} else {
-			projectionList.add(newProjection);
-		}
-
-		return projectionList;
-	}
-
-	// public void removeGrops() {
-	// Projection oldProjection = ((CriteriaImpl)criteria).getProjection();
-	//
-	// if (oldProjection instanceof ProjectionList) {
-	// ProjectionList oldProjectionList = (ProjectionList) oldProjection;
-	// ProjectionList newProjectionList = Projections.projectionList();
-	//
-	// for (int i = 0; i < oldProjectionList.getLength(); i ++) {
-	// Projection projection = oldProjectionList.getProjection(i);
-	//
-	// if (!projection.isGrouped()) {
-	// newProjectionList.add(projection);
-	// }
-	// }
-	//
-	// criteria.setProjection(newProjectionList);
-	// } else if (oldProjection instanceof PropertyProjection){
-	// if (!oldProjection.isGrouped()) {
-	// criteria.setProjection(oldProjection);
-	// }
-	// }
-	// }
-
-	public SearchCriteria setResultTransformer(ResultTransformer resultTransformer) {
-		criteria.setResultTransformer(resultTransformer);
-		return this;
-	}
-
-	public String toString() {
-		return "SearchCriteria(" + criteria.toString() + ')';
-	}
-
-	CriteriaImpl getCriteriaImpl() {
-		return impl;
-	}
-
-	public SearchCriteria createAlias(String associationPath, String alias, int joinType) throws HibernateException {
-		criteria.createAlias(associationPath, alias, joinType);
-		return this;
-	}
-
-	public SearchCriteria createCriteria(String associationPath, int joinType) throws HibernateException {
-		return new SearchCriteria(impl, criteria.createCriteria(associationPath, joinType));
-	}
-
-	public SearchCriteria createCriteria(String associationPath, String alias, int joinType) throws HibernateException {
-		return new SearchCriteria(impl, criteria.createCriteria(associationPath, alias, joinType));
-	}
-
-	public SearchCriteria setComment(String comment) {
-		criteria.setComment(comment);
-		return this;
-	}
-
-	public SearchCriteria setLockMode(LockMode lockMode) {
-		criteria.setLockMode(lockMode);
-		return this;
-	}
-
-	public SearchCriteria setLockMode(String alias, LockMode lockMode) {
-		criteria.setLockMode(alias, lockMode);
-		return this;
-	}
-
-	public String getAlias(String associationPath, String aliasIfNotExist) {
-
-		Iterator i = impl.iterateSubcriteria();
-		while (i.hasNext()) {
-			CriteriaImpl.Subcriteria subcriteria = (CriteriaImpl.Subcriteria) i.next();
-
-			if (subcriteria.getPath().equals(associationPath)) {
-				return subcriteria.getAlias();
-			}
-		}
-
-		createAlias(associationPath, aliasIfNotExist);
-		return aliasIfNotExist;
-	}
-}

+ 0 - 67
src/main/java/com/uas/report/jasperserver/api/search/SearchCriteriaFactory.java

@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.uas.report.jasperserver.api.search;
-
-import java.util.List;
-
-import com.uas.report.jasperserver.api.common.domain.ExecutionContext;
-
-/**
- * Search criteria factory.
- *
- * @author Yuriy Plakosh
- * @version $Id$
- */
-public interface SearchCriteriaFactory {
-
-	/**
-	 * Creates {@link SearchCriteria} instance.
-	 *
-	 * @param context
-	 *            the execution context.
-	 * @param filters
-	 *            the filters.
-	 * @return {@link SearchCriteria} instance.
-	 */
-	SearchCriteria create(ExecutionContext context, List<SearchFilter> filters);
-
-	/**
-	 * Applies sorters to search criteria.
-	 *
-	 * @param context
-	 *            the execution context.
-	 * @param searchCriteria
-	 *            the search criteria.
-	 * @param sorter
-	 *            the sorter.
-	 */
-	void applySorter(ExecutionContext context, SearchCriteria searchCriteria, SearchSorter sorter);
-
-	/**
-	 * get a factory that queries on the type you want, not the hardcoded
-	 * Resource type
-	 * 
-	 * @param type
-	 * @return
-	 */
-	SearchCriteriaFactory newFactory(String type);
-}

+ 0 - 30
src/main/java/com/uas/report/jasperserver/api/search/SearchFilter.java

@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.uas.report.jasperserver.api.search;
-
-import com.uas.report.jasperserver.api.common.domain.ExecutionContext;
-
-/**
- */
-public interface SearchFilter {
-    void applyRestrictions(String type, ExecutionContext context, SearchCriteria criteria);
-}

+ 0 - 43
src/main/java/com/uas/report/jasperserver/api/search/SearchSorter.java

@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.uas.report.jasperserver.api.search;
-
-import javax.annotation.Resource;
-
-import com.uas.report.jasperserver.api.common.domain.ExecutionContext;
-
-/**
- */
-public abstract class SearchSorter {
-    @Resource(name = "queryModificationEvaluator")
-    private QueryModificationEvaluator evaluator;
-
-    public final void applyOrder(String type, ExecutionContext context, SearchCriteria criteria) {
-        if (evaluator == null || evaluator.useFullResource(context)) {
-            addProjection(type, context, criteria);
-        }
-        addOrder(type, context, criteria);
-    }
-
-    protected abstract void addOrder(String type, ExecutionContext context, SearchCriteria criteria);
-    protected abstract void addProjection(String type, ExecutionContext context, SearchCriteria criteria);
-}

+ 0 - 31
src/main/java/com/uas/report/jasperserver/api/search/TransformerFactory.java

@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
- * http://www.jaspersoft.com.
- *
- * Unless you have purchased  a commercial license agreement from Jaspersoft,
- * the following license terms  apply:
- *
- * This program is free software: you can redistribute it and/or  modify
- * it under the terms of the GNU Affero General Public License  as
- * published by the Free Software Foundation, either version 3 of  the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero  General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public  License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.uas.report.jasperserver.api.search;
-
-import java.util.List;
-
-
-/**
- */
-public abstract class TransformerFactory {
-    public abstract ResultTransformer createTransformer(List<SearchFilter> filters, SearchSorter sorter);
-}