Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static GetSharePointMetadata(): SFInterfaces.ISharePointEntityMetadata {
- const ConsoleLoggingLabel = "NewsTickerEntity";
- const EmptyInstance = () => { return new NewsTickerItem() };
- const SharePointListTitle = "VP News";
- const colMappings: SFInterfaces.ISharePointListColumnMapping[] =
- AbstractViewPortItem.commonColumnMappings.concat([
- EntityHelper.GetIntegerMapping("ID", "SharePointID", EntityReadWriteAccess.READ_ONLY),
- EntityHelper.GetTextMapping("Title", "Title"),
- EntityHelper.GetTextMapping("Title", "News"),
- EntityHelper.GetTextMapping("VP_RedirectUrl", "RedirectUrl"),
- EntityHelper.GetDateTimeMapping("VP_EffectiveDate", "EffectiveDate"),
- EntityHelper.GetDateTimeMapping("VP_ExpirationDate", "ExpirationDate"),
- EntityHelper.GetIntegerMapping("VP_ItemDisplaySequence", "DisplaySequence")
- ]);
- return <SFInterfaces.ISharePointEntityMetadata>{
- ConsoleLoggingLabel: ConsoleLoggingLabel,
- SharePointListTitle: SharePointListTitle,
- SharePointListColumnMappings: colMappings,
- SharePointCamlResponseMapper: (camlItem) => {
- return EntityHelper.MapSharePointCamlToEntity(EmptyInstance(), camlItem, colMappings, ConsoleLoggingLabel);
- },
- ValidateEntityFieldsMapping: () => {
- return EntityHelper.ValidateEntityFieldsMapping(EmptyInstance(), colMappings, ConsoleLoggingLabel);
- },
- ValidateCamlResponseMapping: (camlResponse: any) => {
- return EntityHelper.ValidateCamlResponseMapping(camlResponse, colMappings, ConsoleLoggingLabel);
- },
- ValidateEntityMappingIntegrity: () => {
- return EntityHelper.ValidateEntityMappingIntegrity(EmptyInstance(), colMappings, ConsoleLoggingLabel);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement