-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XRENDERING-764: Add an option for messages to be set as status #319
base: master
Are you sure you want to change the base?
Changes from all commits
4ba18ea
9d830a3
0ff0d5c
fe7c2c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
package org.xwiki.rendering.internal.macro.message; | ||
|
||
import org.xwiki.properties.annotation.PropertyAdvanced; | ||
import org.xwiki.properties.annotation.PropertyDescription; | ||
import org.xwiki.properties.annotation.PropertyDisplayType; | ||
import org.xwiki.rendering.macro.box.BoxMacroParameters; | ||
import org.xwiki.stability.Unstable; | ||
|
||
/** | ||
* Parameters for the Message macro. | ||
* | ||
* @version $Id$ | ||
* @since 17.0.0RC1 | ||
*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the whole class should be marked as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, macro parameters being APIs, it's safer to put them under revapi scrutiny. |
||
public class MessageMacroParameters extends BoxMacroParameters | ||
{ | ||
/** | ||
* @see #isStatus() | ||
*/ | ||
private boolean isStatus; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the getter is |
||
|
||
/** | ||
* @since 17.0.0RC1 | ||
* @return whether or not the current message is a status. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might need some more documentation on what exactly a "status" is and why would one set that to |
||
*/ | ||
@Unstable | ||
public boolean isStatus() | ||
{ | ||
return this.isStatus; | ||
} | ||
|
||
/** | ||
* @since 17.0.0RC1 | ||
* @param isStatus refers to {@link #isStatus()} | ||
*/ | ||
@PropertyDescription("Whether or not this message should be announced as a status.") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs a much better description as otherwise users will be completely lost when this flag should be set. The description should clearly explain what consequences this has and when it should be used. Also, I'm wondering if it could make sense to more generically expose a "role" parameter - or is it clear that there is no other role that could be interesting? |
||
@PropertyAdvanced | ||
@Unstable | ||
public void setStatus(boolean isStatus) | ||
{ | ||
this.isStatus = isStatus; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this parameter only used when the icon name is set?