Skip to content

Commit

Permalink
move to a package in metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
dcrissman authored and Marek Paterczyk committed Jun 7, 2017
1 parent e0fbb33 commit b097e7d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ public final class CrudConstants {

public static final String ERR_DATASOURCE_UNKNOWN = "crud:DataSourceUnknown";

/** An unsupported feature was used. */
public static final String ERR_UNSUPPORTED_FEATURE = "crud:UnsupportedFeature:";

private CrudConstants() {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ public final class MetadataConstants {

public static final String ERR_DATASOURCE_UNKNOWN = "metadata:DataSourceUnknown";

/** An unsupported feature was used. */
public static final String ERR_UNSUPPORTED_FEATURE = "metadata:UnsupportedFeature:";

private MetadataConstants() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.redhat.lightblue.crud;
package com.redhat.lightblue.metadata.translator;

import com.redhat.lightblue.metadata.EntityMetadata;
import com.redhat.lightblue.metadata.Field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.redhat.lightblue.crud;
package com.redhat.lightblue.metadata.translator;

import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ContainerNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.redhat.lightblue.crud;
package com.redhat.lightblue.metadata.translator;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -111,7 +111,7 @@ else if (fieldNode instanceof ArrayField) {
translate((ArrayField) fieldNode, cursor, target);
}
else{
throw Error.get(CrudConstants.ERR_UNSUPPORTED_FEATURE + fieldNode.getClass().getName(), fieldNode.getFullPath().toString());
throw Error.get(MetadataConstants.ERR_UNSUPPORTED_FEATURE + fieldNode.getClass().getName(), fieldNode.getFullPath().toString());
}
}
finally{
Expand Down Expand Up @@ -143,7 +143,7 @@ else if(arrayElement instanceof ObjectArrayElement){
translate(field, items, target);
}
else{
throw Error.get(CrudConstants.ERR_UNSUPPORTED_FEATURE + arrayElement.getClass().getName(), field.getFullPath().toString());
throw Error.get(MetadataConstants.ERR_UNSUPPORTED_FEATURE + arrayElement.getClass().getName(), field.getFullPath().toString());
}

cursor.parent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.redhat.lightblue.crud;
package com.redhat.lightblue.metadata.translator;

import java.util.Arrays;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.redhat.lightblue.crud;
package com.redhat.lightblue.metadata.translator;

import static com.redhat.lightblue.util.JsonUtils.json;
import static org.junit.Assert.assertEquals;
Expand All @@ -19,6 +19,7 @@
import com.redhat.lightblue.metadata.ObjectField;
import com.redhat.lightblue.metadata.SimpleArrayElement;
import com.redhat.lightblue.metadata.SimpleField;
import com.redhat.lightblue.metadata.translator.TranslatorFromJson;
import com.redhat.lightblue.metadata.types.StringType;
import com.redhat.lightblue.util.JsonDoc;
import com.redhat.lightblue.util.Path;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.redhat.lightblue.crud;
package com.redhat.lightblue.metadata.translator;

import static org.junit.Assert.assertNotNull;

Expand All @@ -16,6 +16,7 @@
import com.redhat.lightblue.metadata.ObjectField;
import com.redhat.lightblue.metadata.SimpleArrayElement;
import com.redhat.lightblue.metadata.SimpleField;
import com.redhat.lightblue.metadata.translator.TranslatorToJson;
import com.redhat.lightblue.metadata.types.StringType;
import com.redhat.lightblue.util.JsonDoc;
import com.redhat.lightblue.util.Path;
Expand Down

0 comments on commit b097e7d

Please sign in to comment.