This repository has been archived by the owner on Jan 14, 2020. It is now read-only.
/
FlavorBackend.java
48 lines (36 loc) · 2.01 KB
/
FlavorBackend.java
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Copyright 2015 VMware, Inc. All Rights Reserved.
*
* 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 com.vmware.photon.controller.api.frontend.backends;
import com.vmware.photon.controller.api.frontend.entities.FlavorEntity;
import com.vmware.photon.controller.api.frontend.entities.TaskEntity;
import com.vmware.photon.controller.api.frontend.exceptions.external.ExternalException;
import com.vmware.photon.controller.api.frontend.exceptions.external.PageExpiredException;
import com.vmware.photon.controller.api.model.Flavor;
import com.vmware.photon.controller.api.model.FlavorCreateSpec;
import com.vmware.photon.controller.api.model.ResourceList;
import com.google.common.base.Optional;
/**
* Backend interface for flavor related operations.
*/
public interface FlavorBackend {
TaskEntity createFlavor(FlavorCreateSpec flavor) throws ExternalException;
Flavor getApiRepresentation(String id) throws ExternalException;
TaskEntity prepareFlavorDelete(String id) throws ExternalException;
ResourceList<FlavorEntity> getAll(Optional<Integer> pageSize) throws ExternalException;
ResourceList<Flavor> filter(Optional<String> name, Optional<String> kind, Optional<Integer> pageSize)
throws ExternalException;
ResourceList<Flavor> getFlavorsPage(String pageLink) throws PageExpiredException;
FlavorEntity getEntityByNameAndKind(String name, String kind) throws ExternalException;
FlavorEntity getEntityById(String id) throws ExternalException;
void tombstone(FlavorEntity flavor) throws ExternalException;
}