blob: 64f8795ad55b35c1a6527d26c8527cc1d5beb038 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*******************************************************************************
* Copyright (c) 2004, 2007 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
package org.eclipse.osee.framework.core.enums;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
/**
* @author Roberto E. Escobar
*/
public enum CacheOperation {
UPDATE,
STORE;
public static CacheOperation fromString(String value) throws OseeCoreException {
Conditions.checkNotNullOrEmpty(value, "enum string");
for (CacheOperation op : CacheOperation.values()) {
if (op.name().equalsIgnoreCase(value)) {
return op;
}
}
throw new OseeArgumentException("Unable to find cache operation matching [%s]", value);
}
}
|