public class ContentStateUtil extends Object
| Constructor and Description |
|---|
ContentStateUtil() |
| Modifier and Type | Method and Description |
|---|---|
static org.zanata.common.ContentState |
determineState(org.zanata.common.ContentState requestedState,
List<String> contents)
Canonicalises requested state against contents.
|
static org.zanata.common.ContentState |
determineState(org.zanata.common.ContentState requestedState,
List<String> contents,
String resId,
List<String> warnings)
Canonicalises requested state against contents - eg if state is Approved but some contents are empty, state will be changed to New.
|
public static org.zanata.common.ContentState determineState(org.zanata.common.ContentState requestedState,
List<String> contents,
String resId,
@Nonnull
List<String> warnings)
requestedState - desired ContentStatecontents - message contents which will be checked for emptiness to determine the ContentState. Must have at least one element.resId - used to identify the TextFlowTarget in warning messageswarnings - a warning string will be added if state is adjustedpublic static org.zanata.common.ContentState determineState(org.zanata.common.ContentState requestedState,
List<String> contents)
requestedState - contents - determineState(ContentState, List, String, List)Copyright © 2013 Zanata Project. All Rights Reserved.