All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.internet2.middleware.grouper.ws.soap_v2_4.WsAttributeDefDeleteResults Maven / Gradle / Ivy

There is a newer version: 5.13.5
Show newest version
/*******************************************************************************
 * Copyright 2016 Internet2
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 ******************************************************************************/
package edu.internet2.middleware.grouper.ws.soap_v2_4;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import edu.internet2.middleware.grouper.hibernate.GrouperTransactionType;
import edu.internet2.middleware.grouper.misc.GrouperVersion;
import edu.internet2.middleware.grouper.util.GrouperUtil;
import edu.internet2.middleware.grouper.ws.WsResultCode;
import edu.internet2.middleware.grouper.ws.exceptions.WsInvalidQueryException;

/**
 * 
 * results for the attribute defs delete call.
 * 
 * result code: code of the result for this attribute def overall
 * SUCCESS: means everything ok
 * ATTRIBUTE_DEF_NOT_FOUND: cant find the attribute def
 * 
* @author vsachdeva */ public class WsAttributeDefDeleteResults { /** * result code of a request */ public static enum WsAttributeDefDeleteResultsCode implements WsResultCode { /** found the attribute defs, deleted them (lite status code 200) (success: T) */ SUCCESS(200), /** either overall exception, or one or more attribute had exceptions (lite status code 500) (success: F) */ EXCEPTION(500), /** problem deleting existing attribute defs (lite status code 500) (success: F) */ PROBLEM_DELETING_ATTRIBUTE_DEFS(500), /** invalid query (e.g. if everything blank) (lite status code 400) (success: F) */ INVALID_QUERY(400); /** get the name label for a certain version of client * @param clientVersion * @return name **/ @Override public String nameForVersion(GrouperVersion clientVersion) { return this.name(); } /** http status code for rest/lite e.g. 200 */ private int httpStatusCode; /** * status code for rest/lite e.g. 200 * @param statusCode */ private WsAttributeDefDeleteResultsCode(int statusCode) { this.httpStatusCode = statusCode; } /** * @see edu.internet2.middleware.grouper.ws.WsResultCode#getHttpStatusCode() */ @Override public int getHttpStatusCode() { return this.httpStatusCode; } /** * if this is a successful result * @return true if success */ @Override public boolean isSuccess() { return this == SUCCESS; } } /** * results for each deletion sent in */ private WsAttributeDefDeleteResult[] results; /** * metadata about the result */ private WsResultMeta resultMetadata = new WsResultMeta(); /** * metadata about the result */ private WsResponseMeta responseMetadata = new WsResponseMeta(); /** * results for each deletion sent in * @return the results */ public WsAttributeDefDeleteResult[] getResults() { return this.results; } /** * results for each deletion sent in * @param results1 the results to set */ public void setResults(WsAttributeDefDeleteResult[] results1) { this.results = results1; } /** * @return the resultMetadata */ public WsResultMeta getResultMetadata() { return this.resultMetadata; } /** * @see edu.internet2.middleware.grouper.ws.rest.WsResponseBean#getResponseMetadata() * @return the response metadata */ public WsResponseMeta getResponseMetadata() { return this.responseMetadata; } /** * @param responseMetadata1 the responseMetadata to set */ public void setResponseMetadata(WsResponseMeta responseMetadata1) { this.responseMetadata = responseMetadata1; } /** * @param resultMetadata1 the resultMetadata to set */ public void setResultMetadata(WsResultMeta resultMetadata1) { this.resultMetadata = resultMetadata1; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy