-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for describing archive layouts for composed archives, a…
…ddresses #131 (#134) * adding support for custom styling of composed archives. * added tests and javadoc * added nullcheck for layout in httpclient * corrected test names * added missing license header to ArchiveLayout
- Loading branch information
1 parent
caf6cc7
commit 77f5c8a
Showing
5 changed files
with
166 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/** | ||
* OpenTok Java SDK | ||
* Copyright (C) 2017 TokBox, Inc. | ||
* http://www.tokbox.com | ||
* | ||
* Licensed under The MIT License (MIT). See LICENSE file for more information. | ||
*/ | ||
package com.opentok; | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
/** | ||
* Represents a <a href="https://tokbox.com/developer/guides/archiving/layout-control.html">layout configuration</a> | ||
* for a composed archive | ||
*/ | ||
@JsonFormat(shape= JsonFormat.Shape.OBJECT) | ||
public class ArchiveLayout { | ||
private Type type; | ||
private String stylesheet; | ||
|
||
public ArchiveLayout(Type type, String stylesheet) { | ||
this.type = type; | ||
this.stylesheet = stylesheet; | ||
} | ||
|
||
public ArchiveLayout(Type type) { | ||
this.type = type; | ||
} | ||
|
||
public enum Type { | ||
PIP("pip"), | ||
BESTFIT("bestFit"), | ||
VERTICAL("verticalPresentation"), | ||
HORIZONTAL("horizontalPresentation"), | ||
CUSTOM("custom"); | ||
|
||
private String serialized; | ||
|
||
private Type(String s) { | ||
serialized = s; | ||
} | ||
|
||
@JsonValue | ||
public String toString() { | ||
return super.toString().toLowerCase(); | ||
} | ||
} | ||
|
||
public Type getType() { | ||
return type; | ||
} | ||
|
||
public void setType(Type type) { | ||
this.type = type; | ||
} | ||
|
||
public String getStylesheet() { | ||
return stylesheet; | ||
} | ||
|
||
public void setStylesheet(String stylesheet) { | ||
this.stylesheet = stylesheet; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters